Free & Instant

Base64 Encode & Decode

Encode text to Base64 or decode Base64 back to readable text. Supports UTF-8 and URL-safe variants — runs entirely in your browser.

0 chars
0 chars

What is Base64?

Base64 is an encoding scheme that converts binary data into a text format using 64 printable ASCII characters. It's not compression or encryption — the output is actually about 33% larger than the input. Its purpose is to safely transport binary data through systems that only handle text, such as email protocols, JSON payloads, and HTML attributes.

The Base64 Alphabet

Standard Base64 uses 64 characters: A–Z (26), a–z (26), 0–9 (10), + and / (2), with = as padding. URL-safe Base64 replaces + with − and / with _ to avoid conflicts with URL reserved characters.

Standard: A-Z a-z 0-9 + / (pad: =)
URL-safe: A-Z a-z 0-9 - _ (pad: =)
Example:
"Hello, World!" → SGVsbG8sIFdvcmxkIQ==
"CrispTool" → Q3Jpc3BUb29s

Common Use Cases

Base64 appears everywhere in web development: data URIs for embedding images directly in HTML/CSS (data:image/png;base64,...), JWT tokens for authentication, email attachments via MIME encoding, API payloads that need to carry binary data in JSON, and storing small binary blobs in databases that only support text fields.

Size Overhead

Base64 encoding increases data size by approximately 33% because every 3 bytes of input become 4 bytes of output. This is the tradeoff for text-safe transport. For large files, this overhead matters — which is why Base64 is typically used for small payloads rather than large file transfers.

Frequently Asked Questions

Related Tools