Base64 Encode / Decode — Tinker
← Tinker
Input (plain text)
Output (base64)
📁 Drop a file here or click to select — encode file to Base64
Base64 encodes binary data as ASCII. Output is ~33% larger than input. Safe for embedding in JSON, HTML, CSS, and data URIs.

What Is Base64?

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.

Where is Base64 used?

ContextExamplePurpose
Data URIsdata:image/png;base64,iVBOR…Embed images inline in HTML/CSS
JWT tokenseyJhbGciOiJIUzI1NiJ9…Header & payload are Base64url encoded
Email (MIME)Content-Transfer-Encoding: base64Safely send attachments over SMTP
HTTP Basic AuthAuthorization: Basic dXNlcjpwYXNzEncode user:password as Base64
CSS backgroundsbackground-image: url("data:…")Bundle small assets without extra HTTP requests
JSON / XMLBinary fields encoded as stringsAvoid encoding conflicts in text formats

Base64 vs Base64url

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