Base64 Encoder/Decoder

Encode text to Base64, or decode it back — Unicode-safe.

Encode text to Base64 or decode it back, with full Unicode/UTF-8 support for accented characters and emoji. Runs in your browser — nothing is uploaded.

How Base64 works

Base64 turns any data into text using 64 safe characters: A–Z, a–z, 0–9, + and /. It takes 3 bytes (24 bits) at a time and splits them into four 6-bit groups, each mapped to one character. If the input isn't a multiple of 3 bytes, = signs are added as padding at the end.

For example, the word Man (3 bytes) becomes TWFu, and Hello, world! becomes SGVsbG8sIHdvcmxkIQ==.

Because every 3 bytes become 4 characters, Base64 output is about 33% larger than the original.

Where you'll see Base64

  • Data URLs: small images embedded directly in HTML or CSS, like data:image/png;base64,iVBOR…
  • Email attachments: the MIME standard sends files as Base64 text.
  • APIs: files and binary data are often sent inside JSON as Base64 strings.
  • Login headers: HTTP Basic authentication sends "username:password" as Base64.
  • JWT tokens: the header and data parts of a JSON Web Token use a URL-safe variant of Base64.

Base64 is not encryption

Anyone can decode Base64 instantly — that's exactly what this tool does. It changes how data is written, not who can read it. Never use it to hide passwords or private data; use real encryption for that.

To check whether a file or text has changed, use a hash instead, with the hash generator.

Frequently asked questions

What is Base64 used for?

Encoding binary or text data as plain ASCII characters — commonly used for embedding images in CSS/HTML, encoding data in URLs, and email attachments.

Does this support Unicode text?

Yes — text with accents, emoji, or non-Latin scripts is encoded correctly using UTF-8 before Base64 conversion.

Why does decoding show an error?

The input probably isn't valid Base64 — it may contain characters outside the Base64 set, be cut short, or use the URL-safe variant, which swaps + and / for - and _.

How does it handle accented letters and emoji?

Text is first converted to UTF-8 bytes and then encoded, so "café" becomes Y2Fmw6k= and decodes back exactly.