How to use the base64 encoder / decoder
- Choose Encode or Decode.
- Type or paste your text (or Base64). The result updates as you type.
- For encoding, switch on URL-safe if the value goes into a URL, a JWT or a filename, and decide whether to keep the = padding.
- Copy the output, download it, or click Swap to feed the result back in and go the other way.
Features
- Correct UTF-8 handling: emoji, Indic scripts, CJK and accented text all round-trip
- Standard and URL-safe alphabets, with optional padding
- Decoder accepts line breaks, whitespace, data: URL prefixes and unpadded input
- Byte and character counts, and a warning when decoded data looks binary
- Swap button to reverse the operation instantly
What Base64 is for
Base64 represents arbitrary bytes using 64 printable characters, so binary data can travel through systems built for text: email attachments, JSON fields, HTML data URLs, HTTP basic authentication headers and JWTs. It is an encoding, not encryption; anyone can decode it, so it offers no secrecy.
The price is size: every 3 bytes become 4 characters, so Base64 is about 33% larger than the original. That's fine for small values and a bad idea for large files.
Standard versus URL-safe
The standard alphabet uses + and /, which have special meaning in URLs and filenames. The URL-safe variant (RFC 4648 §5) swaps them for - and _, and usually drops the trailing = padding. JWTs use the unpadded URL-safe form. This decoder accepts both automatically.