Free · No sign-up · Runs in your browser

Base64 Encoder & Decoder

Convert text to Base64 and back. Unlike many browser tools, this handles the full Unicode range correctly — accented characters, non-Latin scripts, and emoji all round-trip without corruption.

Input
Output
0 chars

What Base64 actually is

Base64 represents binary data using 64 printable ASCII characters: A–Z, a–z, 0–9, plus + and /, with = as padding. It takes three bytes at a time and re-expresses them as four characters, which is why encoded output is always about 33% larger than the input. Its purpose is to move binary data safely through systems that only reliably handle text.

Base64 is encoding, not encryption

This matters and is widely misunderstood. Base64 provides no security whatsoever — anyone can decode it instantly, as this page demonstrates. It obscures nothing. Never use it to store passwords, API keys, or personal data thinking it protects them. If you need secrecy, you need encryption; if you need integrity, you need a hash. Base64 solves a transport problem, not a security one.

Where you will encounter it

  • Data URIs — embedding a small image directly in HTML or CSS as data:image/png;base64,….
  • Email attachments — MIME encodes binary attachments as Base64, because SMTP was designed for text.
  • HTTP Basic auth — the header is Authorization: Basic followed by Base64 of user:password. This is exactly why Basic auth requires HTTPS.
  • JSON Web Tokens — each of the three parts is Base64URL encoded.
  • API payloads — sending file contents inside a JSON request body.

Why plain btoa() breaks on emoji

The browser's built-in btoa() throws an error on any character above U+00FF, so a naive implementation fails on "café" and on every emoji. This tool converts your text to UTF-8 bytes first and encodes those, which is the correct approach and means héllo 🎉 encodes and decodes back identically.


Frequently asked questions