🔐Base64 Encoder and Decoder

Encode and decode Base64 text

How to use the Base64 encoder and decoder

Base64 rewrites arbitrary byte data using only 64 characters: A-Z, a-z, 0-9, plus and slash. It exists so that binary values can travel through channels that only accept text, such as email attachments, data URIs, JWT payloads and API authorization headers. Base64 is an encoding, not encryption, so anyone can reverse it in a second. Never use it to hide passwords or personal data.

This tool converts your text to UTF-8 bytes first and then encodes those bytes. The browser's built-in btoa function only accepts Latin-1, which is why pasting emoji or non-Latin scripts into other tools throws an error. Because the UTF-8 step happens first here, emoji, Korean, Japanese and accented letters all survive a full encode and decode round trip unchanged.

Decoding also accepts the URL-safe variant: dashes and underscores are mapped back to plus and slash, missing trailing equals padding is restored, and line breaks or spaces inside the string are ignored. Encoding always outputs the standard form. Input is capped at 200,000 characters, and everything runs inside your browser, so nothing you paste is sent to a server.

Frequently Asked Questions

Does Base64 keep my content secret?

No. Base64 is an encoding, not encryption, and anyone can decode it instantly. Passwords and personal data need real encryption on top of it.

Why do other tools fail when I paste emoji or non-Latin text?

The browser's btoa function only accepts Latin-1 characters. This tool converts your text to UTF-8 bytes first, so emoji and non-Latin scripts round-trip without errors.

My string keeps failing to decode. Why?

It is usually truncated, contains characters that are not valid Base64, or holds binary data such as an image that cannot be read back as UTF-8 text. This tool only displays text results.