Glossary
Plain English
Cross-linked to tools

Base64

Also known as: Base-64, Base 64 encoding

Base64 is a way of encoding arbitrary binary data as a string of 64 ASCII characters (A–Z, a–z, 0–9, '+', '/') so it can travel through systems that only handle plain text — like email, URLs, JSON, or HTML data URIs.

Overview

Base64 takes three bytes of input at a time (24 bits) and emits four output characters (6 bits each). The output is exactly 4/3 the size of the input, padded with '=' characters when the input length is not a multiple of three. Because every output character is a printable ASCII letter, digit, or punctuation mark, the encoded string survives transport through text-only channels without escaping or corruption. Base64URL is a URL-safe variant that swaps '+' and '/' for '-' and '_' — the encoding JWTs use for their three segments.

Base64 is not encryption. Anyone who sees a Base64 string can decode it back to the original bytes in milliseconds — there is no key, no secret. Treat it strictly as a transport encoding.

Common questions about Base64

Is Base64 encryption?
No. Base64 is a reversible encoding with no key — anyone who sees the encoded string can decode it back instantly. Never use Base64 to 'hide' passwords or secrets; it provides no security at all.
Why is the output longer than the input?
Base64 encodes three bytes (24 bits) of input as four ASCII characters (6 bits each), so the output is exactly 4/3 the size of the input plus '=' padding when the input length is not a multiple of three.
What's the difference between Base64 and Base64URL?
Standard Base64 uses '+' and '/' as the last two characters of its alphabet, which have special meaning in URLs. Base64URL replaces them with '-' and '_' so the encoded string is safe to drop into a URL or filename without escaping. JWTs use Base64URL.

Tools that work with Base64

Base64 Encoder / Decoder

Encode text to Base64 and decode it back, all offline.

JWT Decoder

Decode and inspect JSON Web Token claims without sending them anywhere.

External references