Base64 Encoder / Decoder

Encode and decode Base64 instantly — full UTF-8 support for CJK and emoji.

Runs locally in your browser — nothing leaves your device.

Base64

RFC 4648 §4 · UTF-8 bridge · local only

UTF-8 local only

Input

Paste text or a Base64 string, then choose a direction.

0 chars ⌨ Ctrl+Enter

Paste content then click Encode or Decode.

Output

Result appears instantly, ready to copy.

0 chars State: idle

About Base64

Base64 encodes every 3 bytes into 4 ASCII characters, making the output ~33% larger than the source. This lets arbitrary binary data travel safely through plain-text channels such as email, URLs, and JSON.

JavaScript's built-in btoa() only accepts Latin-1 characters (codepoint ≤ 255). For multi-byte characters — Chinese, Japanese, emoji — the text must first be converted to UTF-8 bytes via TextEncoder before Base64 encoding. This tool includes that bridge so all Unicode roundtrips correctly.

Common uses: storing API tokens in .env files, HTTP Basic Auth headers, data URIs for inline images, reading JWT payload segments, MIME email attachments. This tool implements RFC 4648 §4 standard Base64 (using + and /). URL-safe Base64 (- and _) is out of scope.

Quick guide

Use cases, answers, and nearby tools

Compact below-tool notes that help first-run users and repeated visitors move faster without changing the main interface.

Chinese search: Base64 編碼器、Base64 解碼器、Base64 轉換、Base64 中文編碼、線上 Base64

How to use

Run a clean first pass

  1. Paste text or a Base64 string into the input.
  2. Click Encode to convert text to Base64, or Decode to restore text from Base64.
  3. Check the Byte Meter for encoding overhead, then click Copy to grab the result.

Examples

Real jobs this page helps with

  • Store API token in .envEncode an API key so special characters do not break the .env format.
  • Verify CJK roundtripType Chinese text, encode it, click ↕ Swap, then decode to confirm the UTF-8 bridge restores it correctly.

FAQ

What people usually want to know

Can this handle Chinese characters and emoji?
Yes. This tool uses TextEncoder to convert text to UTF-8 bytes before Base64 encoding — full Unicode support.
Does any data leave my browser?
No. All encoding and decoding happens locally in your browser. Nothing is sent to any server.
Why is Base64 output larger than the original?
Base64 encodes every 3 bytes into 4 ASCII characters, so output is always ~33% larger than the raw data.