Base64 Encoder / Decoder
Encode any string or file to Base64 (or Base64URL) and decode it back. Useful for inspecting auth headers, embedding payloads, decoding JWT parts, or debugging quoted-printable email content.
Base64 vs Base64URL
Standard Base64 uses A-Z a-z 0-9 + / and pads with =. That alphabet
breaks when the output goes into a URL, filename, or HTTP header because +,
/, and = have reserved meanings. Base64URL (RFC 4648) replaces
+ with -, / with _, and usually omits the
trailing = padding entirely. JWT tokens use Base64URL.
Unicode handling: the browser's built-in btoa() only works on
Latin-1 (8-bit) strings, so non-ASCII characters cause "InvalidCharacterError". This tool
encodes the input as UTF-8 bytes first (via TextEncoder), so any Unicode text
round-trips correctly. Try pasting some emoji — they encode cleanly.