>_
B64

Base64 Encode / Decode

Encode text to Base64 or decode Base64 back to text. Full UTF-8 support (emoji, Chinese), URL-safe variant, and file to Base64 conversion.

Runs locally — your input never leaves this page.

How to use

  1. Choose Encode or Decode.
  2. Type or paste your text. The result updates as you type.
  3. Enable “URL-safe” to use - and _ instead of + and / and drop the = padding (Base64URL, as used in JWTs).
  4. Use “File → Base64” to turn an image or any file into a Base64 data URI.

FAQ

Why does btoa() fail with non-English text?

The browser’s btoa() only accepts Latin-1 characters. This tool first encodes text as UTF-8 bytes, so emoji and CJK characters work correctly.

Is Base64 encryption?

No. Base64 is an encoding, not encryption — anyone can decode it. Never use it to protect secrets.

Why is Base64 output larger than the input?

Base64 represents every 3 bytes with 4 ASCII characters, so output is about 33% larger.

Report a bug or suggest a feature →