Base64 converts binary data (images, files, any bytes) into a string of safe ASCII characters (A-Z, a-z, 0-9, +, /). This matters because many systems — emails, JSON, URLs, XML — can only handle text. Base64 lets you shove binary data through text-only channels. The tradeoff: Base64 strings are 33% larger than the original data.
Instead of a separate HTTP request for a tiny icon or logo, encode it as Base64 and embed it directly:
background-image: url(data:image/png;base64,iVBORw0KGgo...);
When to do this: icons under 5KB, CSS background patterns, email template images (email clients block external images but render inline Base64). When NOT to do this: images over 10KB — the Base64 string bloats the CSS file and hurts caching.
Encode any image with the Base64 Encoder — paste the string into your CSS.
HTTP Basic Authentication encodes credentials as Base64:
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
That Base64 string decodes to username:password. Base64 is NOT encryption — it is trivially reversible. Basic Auth only works over HTTPS. Use the Base64 tool to decode API headers during debugging, or encode credentials for curl commands.
JWT tokens have three Base64-encoded sections: header.payload.signature. Decoding the payload reveals the claims (user ID, expiration, roles) without needing the signing key:
eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjoiam9obiIsImV4cCI6MTc3NTAwMH0.signature
Decode the middle section with the Base64 tool or use the specialized JWT Decoder which parses the full structure and converts timestamps to readable dates.
JSON does not support binary data. If you need to include a file, image, or binary blob in a JSON API request or response, Base64 is the standard approach:
{"avatar": "data:image/jpeg;base64,/9j/4AAQSkZJRg...", "filename": "photo.jpg"}
Common in: profile photo uploads, document attachments in APIs, webhook payloads that include files.
Email was designed for text in the 1970s. Every email attachment — every PDF, image, and document — is Base64 encoded inside the MIME structure. When you "attach" a file to an email, your client encodes it as Base64, the recipient's client decodes it back. This is why a 10MB attachment makes the email ~13.3MB (the 33% Base64 overhead).
Try Base64 Encoder — free, private, unlimited.
Open Base64 Encoder