What Is Base64?
Base64 is an encoding scheme that converts binary data into a string of 64 printable ASCII characters (A-Z, a-z, 0-9, +, /). The name comes from those 64 characters.
Base64-encoded strings contain only safe text characters, making binary data safe to transmit through text-based protocols like HTTP, email, and JSON.
Common Use Cases for Base64
- Embed images in HTML/CSS: Convert small images to Base64 Data URIs to inline them directly in code, eliminating HTTP requests
<img src="data:image/png;base64,iVBORw0KGgo..."> - Email attachments: The MIME standard uses Base64 to encode binary attachments for text-based email protocols
- JWT tokens: The header and payload sections of JSON Web Tokens are Base64URL-encoded
- HTTP Basic Auth: Credentials are Base64-encoded in the Authorization header (note: encoding only, not encryption)
- Data storage: Store binary data (images, certificates) inside JSON or XML documents
Base64 Tools on tool.tl
- Base64 Text Encoder: Encode plain text to a Base64 string
- Base64 Text Decoder: Decode a Base64 string back to plain text
- Image to Base64: Convert image files to Base64 Data URIs
- Base64 to Image: Decode Base64 Data URIs back to downloadable images
How to Encode Text (Step by Step)
- Go to tool.tl/base64-encoder
- Paste the text you want to encode into the input box
- The Base64 result appears in real time on the right
- Click to copy the encoded string
How Base64 Works (Brief)
Base64 groups every 3 bytes (24 bits) of input and converts them to 4 Base64 characters (6 bits each). This means Base64-encoded data is approximately 33% larger than the original.