Encode text or data to Base64, or decode Base64 strings back to readable text. Base64 is widely used to embed images in HTML, transmit binary data over text-based protocols, and encode credentials for API authentication.
Last updated: June 2026
Convert any text to Base64 encoding or decode Base64 strings back to readable text. Useful for data URIs, email encoding, API authentication, and more.
Base64 is a binary-to-text encoding scheme that converts binary data into a string of ASCII characters. It uses 64 characters (A-Z, a-z, 0-9, +, /) plus padding (=) to represent any data as printable text. The encoding increases data size by approximately 33% but ensures the data can be safely transmitted through systems that only handle text.
Embedding images in HTML and CSS using data URIs (data:image/png;base64,...). Encoding binary attachments in email (MIME encoding). Sending binary data in JSON payloads. HTTP Basic Authentication headers (Authorization: Basic base64(user:pass)). Storing binary data in text-based formats like XML or JSON. Encoding URL parameters that contain special characters.
Base64 is encoding, not encryption. It transforms data into a different representation but provides zero security — anyone can decode a Base64 string instantly. Never use Base64 to "protect" sensitive data like passwords or API keys. For actual security, use proper encryption algorithms.
| Original Size | Encoded Size | Overhead |
|---|---|---|
| 1 KB | 1.37 KB | +37% |
| 10 KB | 13.7 KB | +37% |
| 100 KB | 137 KB | +37% |
| 1 MB | 1.37 MB | +37% |
| 10 MB | 13.7 MB | +37% |
Base64 uses 4 characters to represent every 3 bytes of input, resulting in approximately 33% size increase. This is the tradeoff for converting binary data into safe, text-only characters.
This tool encodes and decodes text strings. For file-to-Base64 conversion (like images), you would need to read the file as binary first. Many programming languages have built-in functions for this.
JSON Formatting Best Practices for Developers
Everything you need to know about JSON formatting, validation, and common pitfalls.
The Complete Guide to Base64 Encoding and Decoding
Everything you need to know about Base64: what it is, how it works, when to use it.