Base64

Encode any text to Base64 or decode a Base64 string back to plain text. UTF-8 safe — emojis and non-ASCII characters round-trip correctly. Everything happens locally in your browser.

What is Base64 encoding?

Base64 is a binary-to-text encoding that represents arbitrary bytes using only 64 ASCII characters: A–Z, a–z, 0–9, +, and /. Every 3 input bytes become 4 output characters, padded with = when needed. The encoded form is ~33% larger than the original.

When should I use Base64?

  • Embedding small images or fonts inline via data: URIs in CSS or HTML.
  • HTTP Basic Authentication headers (Authorization: Basic <base64>).
  • Encoding the header and payload of a JSON Web Token (uses URL-safe Base64).
  • Safely sending binary data over text-only channels like email (MIME) or JSON fields.

Base64 is not encryption. Anyone can decode it. Use it for transport, not for secrecy.

UTF-8 and emoji handling

The native browser functions btoa() and atob() only work on Latin-1 strings and throw on non-ASCII input. This tool wraps them with a TextEncoder/TextDecoder pass so that UTF-8 text — including emojis and CJK characters — round-trips exactly.

Privacy

Encoding and decoding both happen entirely in your browser. Open the Network tab while you process — there are zero requests. Safe to use with sensitive strings, credentials, or internal data.