W

What is Base64?

Base64 is an encoding scheme that represents binary data using 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). It is used when binary data must travel through text-only channels — email, JSON strings, JWT segments, or data URLs. Base64 increases size by roughly 33% but guarantees transport safety.

Base64 vs Base64URL

Base64URL replaces `+` and `/` with `-` and `_` and often omits padding `=` so encoded values are safe in URLs without extra escaping — required for JWT segments.

When developers use Base64

Embedding small images in CSS (data URLs), encoding binary attachments in JSON APIs, and representing JWT header/payload segments. It is encoding, not encryption — anyone can decode Base64 without a key.

Decoding pitfalls

Invalid padding or wrong alphabet (standard vs URL-safe) causes decode failures. Always match the encoding variant your source system used before assuming data corruption.

Related tools

See also

Explore related topics