Base64 Encode & Decode

Encode text to Base64 or decode it back, with proper UTF-8 so emoji and accented letters survive. Switch to Base64URL for JWTs and URL parameters.

How it works

Base64 (RFC 4648) turns every 3 bytes into 4 characters from a 64-character alphabet, padding the end with =. Output is always about 33% larger than the input.

Base64URL swaps + and / for - and _ and usually drops the padding, so the result is safe in URLs and file names. JWT segments use it.

It is an encoding, not encryption: anyone can decode it.

Everything above runs in JavaScript inside this tab. Your data is not uploaded. Inputs are remembered in this browser only so they survive a reload; you can switch that off on the privacy page.

Questions

Why does decoding give garbled characters?

Either the data is binary (an image, a gzip stream) rather than text, or it was encoded from a non-UTF-8 charset. The decoder reports when bytes are not valid UTF-8.

Is Base64 encryption?

No. It is reversible by anyone and provides no secrecy.