Base64 Encode/Decode

Convert text to Base64 or back. Unlike a naive btoa(), this correctly handles characters outside ASCII (Cyrillic, emoji).

Input code
Result

Use cases

  • Encoding data for transport in a URL or header
  • Decoding Base64 strings from a JWT or API response
  • Embedding small files as a data URI

FAQ

Why does plain browser btoa() break non-Latin text?

btoa() only handles Latin1 characters. This tool first encodes the text as UTF-8 bytes, so Cyrillic and emoji are handled correctly.

What happens when decoding invalid Base64?

You get a clear error message instead of garbled output.

Related tools