Base64 Encoder / Decoder

Paste text to encode it as Base64, or paste Base64 to decode it — UTF-8 safe, with a URL-safe option. Runs entirely in your browser; nothing is uploaded.

How this tool works

Encoding converts your text to UTF-8 bytes and then to the 64-character Base64 alphabet; decoding does the reverse and verifies the result is valid UTF-8 text. Both happen entirely in your browser — nothing you paste is sent to a server, which makes it safe to use on tokens and config values you'd rather not share.

Frequently asked questions

Is Base64 encryption?

No. Base64 is an encoding, not encryption — anyone can decode it instantly, with this tool or one line of code. It exists to carry binary or non-ASCII data safely through systems that only handle plain text (email, JSON, URLs, HTTP headers), not to hide anything. Never use it to protect passwords or secrets.

What is the URL-safe variant for?

Standard Base64 uses + and /, and pads with =. All three have special meanings inside a URL, so the URL-safe alphabet swaps them for - and _ and drops the padding. JSON Web Tokens (JWTs), OAuth state parameters, and most modern APIs use the URL-safe form. This tool's decoder accepts either alphabet, with or without padding.

Why does my decoded output look like garbage?

Because the Base64 you pasted encodes binary data — an image, a PDF, a compressed file — rather than text. The decode succeeded, but the bytes aren't a UTF-8 string, so there's nothing readable to show. Base64 in a data: URL (like an inline image in CSS) is the most common source of this.

Why is the encoded output about a third longer than my text?

Base64 turns every 3 bytes of input into 4 characters of output, so encoded data is always ~33% larger. That's the trade for being safe to paste anywhere. It's also why encoding large files inline (in HTML or CSS) can hurt page weight more than linking to them.

Does this handle emoji and non-English text correctly?

Yes. Many online Base64 tools break on anything outside basic ASCII because the browser's built-in btoa() only understands single-byte characters. This tool converts text to UTF-8 bytes first, so emoji, accented letters, Hindi, Arabic, CJK, and everything else round-trips exactly.

Related tools

Command Palette

Search for a command to run...