🔐 Base64 Encode/Decode

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

Base64 Encode & Decode Online

Convert any text to Base64 encoding or decode Base64 strings back to readable text. Useful for data URIs, email encoding, API authentication, and more.

What Is Base64?

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.

Common Use Cases

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 vs. Encryption

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.

Base64 Size Impact

Original SizeEncoded SizeOverhead
1 KB1.37 KB+37%
10 KB13.7 KB+37%
100 KB137 KB+37%
1 MB1.37 MB+37%
10 MB13.7 MB+37%

Frequently Asked Questions

Why does Base64 make data larger?

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.

Can I encode files (not just text)?

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.

Related Guides

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.