Base64 is an encoding scheme that converts binary data into a string of 64 printable ASCII characters. It was designed to safely transmit binary content (images, files, binary blobs) through channels that only handle text — such as email, JSON payloads, and HTML attributes.
Base64 does not encrypt or compress data. It only re-encodes it. The output is always approximately 33% larger than the original.
| Context | Example | Purpose |
|---|---|---|
| Data URIs | data:image/png;base64,iVBOR… | Embed images inline in HTML/CSS |
| JWT tokens | eyJhbGciOiJIUzI1NiJ9… | Header & payload are Base64url encoded |
| Email (MIME) | Content-Transfer-Encoding: base64 | Safely send attachments over SMTP |
| HTTP Basic Auth | Authorization: Basic dXNlcjpwYXNz | Encode user:password as Base64 |
| CSS backgrounds | background-image: url("data:…") | Bundle small assets without extra HTTP requests |
| JSON / XML | Binary fields encoded as strings | Avoid encoding conflicts in text formats |
Standard Base64 uses + and / characters which are special in URLs. Base64url (used in JWTs and OAuth) replaces + with - and / with _, and omits padding =. This tool handles standard Base64 — paste a JWT and it will decode correctly thanks to automatic character substitution.
© 2026, Tinker - tools · calculators · practice games