Got My Tools

Base64 Encode / Decode

Encode text to Base64, or decode a Base64 string back to readable text.

Result

Handles full UTF-8 text (emoji, accents, non-Latin scripts) — everything runs in your browser.

What Base64 actually does

Base64 turns arbitrary binary or text data into a string made up of only 64 safe characters (A–Z, a–z, 0–9, +, /) — the kind of alphabet that survives being pasted into places that were only ever designed for plain text, like email bodies, JSON strings, or old-school data URLs for embedding small images directly in HTML/CSS.

Why encoded text is about a third longer

Base64 packs every 3 bytes of input into 4 output characters, so the encoded result is always roughly 33% larger than the original. That overhead is the trade-off for using an alphabet simple enough to survive any text-only system without corruption.

Worked example

Encoding Hello, World! produces:

SGVsbG8sIFdvcmxkIQ==

The trailing == is padding — it appears when the input length isn't a clean multiple of 3 bytes, so the last group needs to be padded out to a full 4-character block.

Frequently asked questions

Does this handle emoji and non-English text?+

Yes — text is encoded as UTF-8 first, so accented letters, emoji, and non-Latin scripts round-trip correctly (plain btoa()/atob() alone can't do this).

What is the URL-safe alphabet option for?+

Standard Base64 uses + and / and pads with =, which aren't safe to put directly in a URL or filename. The URL-safe variant swaps those for - and _ and drops padding.

Is this the same as encryption?+

No — Base64 is just a reversible encoding, not encryption. Anyone can decode it; don't use it to hide secrets.