ToolBirch

Base64 Encoder / Decoder

Encode text to Base64 or decode it back, with correct UTF-8 handling.Developer Tools

Base64 encoder / decoder

Encode UTF-8 text to Base64 or decode Base64 back to text. Whitespace and URL-safe characters are accepted on input.

Result

About this tool

Base64 of text is deceptively easy to get wrong once non-ASCII characters are involved. This tool encodes and decodes through UTF-8 bytes explicitly, so emoji and accented letters round-trip correctly.

How to use the Base64 Encoder / Decoder tool

  1. Pick a direction. Choose Encode to turn text into Base64, or Decode to turn Base64 back into text.
  2. Enter your input. Type or paste your value. Whitespace and URL-safe characters are accepted when decoding.
  3. Run and copy. Click Encode text or Decode Base64, then copy the result. Invalid input is reported clearly.

Supported formats

Input

  • Plain text (UTF-8)
  • Base64 text

Output

  • Base64 text
  • Decoded UTF-8 text

Inputs are validated before anything is processed. Invalid values and unsupported files are rejected with a clear error instead of failing silently.

Frequently asked questions

Why not just use btoa and atob?

Those built-ins work on byte strings, not Unicode text. Encoding through TextEncoder and decoding through TextDecoder keeps multi-byte characters intact.

Is URL-safe Base64 supported?

Yes on input. Whitespace and the URL-safe - and _ characters are accepted when decoding, and missing padding is added. Output always uses standard + and / characters.

What happens with invalid input?

Malformed padding or illegal characters produce a clear error instead of an empty or corrupted result.

Is this for files?

No. For file bytes use the dedicated Image to Base64 tool. This one is for text.

Privacy

Everything you enter stays in this browser tab. There is no upload endpoint for tool inputs, no account, and no server-side copy of your text or files. Results are produced locally and disappear when you close the page.

No account is required and no file is ever uploaded. See the privacy policy for details about analytics and the limited data this site stores.

Known limitations

  • Only UTF-8 text is supported; arbitrary binary data should use the file-based Image to Base64 tool.
  • Data-URL prefixes are not stripped automatically; paste only the Base64 portion.
  • Large inputs enlarge the output by roughly a third and are limited by browser memory.

Other free tools from the same collection.