Base64 Encode / Decode

Encode or decode text as Base64, with correct handling of accented characters and emoji.

⏱ Updated: 18 Sep 2026

Calculator

Free Base64 encoder and decoder, with correct UTF-8 handling for non-English text.

Paste text or Base64 and switch modes to convert between them.

How to Use the Base64 Encode / Decode Calculator

Switch between Encode and Decode with the toggle, then type or paste into the text box — the converted result appears below it, with a copy button next to the output.

Base64 isn't compression and it isn't encryption. It's a way of representing arbitrary binary data — images, files, encryption keys, anything — using only 64 printable ASCII characters, so that data can pass safely through systems built to handle text and nothing else, like email bodies or URL query strings. Every three raw bytes become four Base64 characters, which is why encoded output always runs about a third longer than the original.

3 bytes (24 bits) → 4 Base64 characters (6 bits each)

Why Plain btoa() Breaks on Accented Text

JavaScript's built-in btoa() and atob() look like the obvious tools for this, and they mostly work — until the text has an accented letter, a curly quote, or an emoji in it. Those functions operate on UTF-16 code units directly rather than UTF-8 bytes, so anything outside plain ASCII either throws an error or silently corrupts. It's a genuinely common bug: production code has shipped Base64 encoders that mangle a name the moment it contains an "é" or "ñ". This calculator runs a proper UTF-8 encode/decode step first before touching btoa/atob, so accented characters, CJK text, and emoji round-trip correctly.

One more thing worth stating plainly: anyone can decode Base64 instantly — it's not a secret, just a different representation of the same data. Don't use it anywhere confidentiality actually matters; that's what real encryption is for.