Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 back to plain text.
Overview
Paste plain text or a Base64-encoded string and round-trip between the two formats in one step. The encoder handles UTF-8 input correctly (so emoji and non-Latin characters survive), and the decoder is forgiving of missing padding and embedded whitespace - both common when copying values out of HTTP headers or JSON Web Tokens.
This is for developers who need to inspect or craft Base64 payloads while debugging APIs, JWTs, data URIs, MIME-encoded email, or webhook signatures. Reach for it any time you're poking at a string that looks suspiciously like eyJhbGciOi... or iVBORw0KGgo....
How it works
Base64 encoding (defined in RFC 4648) maps every 3 input bytes to 4 ASCII characters drawn from the alphabet A-Z, a-z, 0-9, +, /, padded with = to a multiple of 4 output characters. The decoder reverses this, ignoring whitespace and tolerating optional padding.
URL-safe Base64 (also in RFC 4648) substitutes - for + and _ for /, which is what JWTs and most modern web tokens use. The decoder auto-detects both alphabets so you can paste either variant.
Examples
- Encode plain text:
hello world → aGVsbG8gd29ybGQ= - Decode a Base64 string:
Q2xhdWRlIENvZGU= → Claude Code - UTF-8 round trip with a non-ASCII character:
Café → Q2Fmw6k= - A JWT header (URL-safe Base64) decoded:
eyJhbGciOiJIUzI1NiJ9 → {"alg":"HS256"}
FAQ
Why does my decoded output look like garbage?
The string probably isn't Base64 - or it's a different encoding (hex, percent-encoding). Base64 always uses the 64-character alphabet and is a multiple of 4 characters when padded.
Do I need the = padding?
For decoding, no - most decoders accept missing padding. For encoding, the canonical RFC 4648 output is padded. JWTs use unpadded URL-safe Base64.
Is Base64 encryption?
No - it's an encoding, not encryption. Anyone can decode it. Use it to transport binary data through text-only channels (email, JSON, URLs), never to hide secrets.
What's the size overhead?
About 33% - every 3 bytes become 4 characters, plus up to 2 padding characters. Plan accordingly for size-sensitive headers or QR codes.