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.
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.
URL-safe: A-Z a-z 0-9 - _ (pad: =)
"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
Base64 converts binary data to text using 64 ASCII characters. It's used to safely embed binary data in text-based formats like JSON, HTML, and email.
To safely transport binary data through text-only systems. Common uses: data URIs, JWT tokens, email attachments, API payloads, and embedding images in CSS.
No. Base64 is encoding, not encryption. Anyone can decode it back to the original. It provides zero security — it's purely a format conversion.
It replaces + with - and / with _, making the output safe to use in URLs and filenames without additional percent-encoding.
Yes. Everything runs in your browser. Nothing is sent to any server or stored anywhere.