Base64 Encode & Decode
Encode text to Base64 or decode back — all in your browser.
What is Base64 Encoding?
Base64 is a binary-to-text encoding scheme that represents binary data using 64 ASCII characters. It was originally designed for sending binary data through systems that only support text, such as email (MIME) and URLs.
How to Use This Tool
The encoding works by taking groups of 3 bytes (24 bits) and splitting them into 4 groups of 6 bits. Each 6-bit group maps to one of 64 printable characters. If the input length isn't a multiple of 3, the output is padded with <code class="text-blue-600 dark:text-blue-400 bg-zinc-100 dark:bg-zinc-900 px-1 py-0.5 rounded text-xs">=</code> characters.
Common Base64 Use Cases
Frequently Asked Questions
- Is Base64 encryption?
- No. Base64 is an encoding scheme, not encryption. It converts binary data to ASCII text for safe transmission. Anyone can decode Base64 — it provides no security. Never use Base64 to hide passwords or sensitive data.
- Why does Base64 make data larger?
- Base64 encodes every 3 bytes of input into 4 ASCII characters, resulting in approximately 33% size increase. This trade-off allows binary data to be safely transmitted through text-only channels like email or JSON.
- Is my data sent to a server?
- No. All encoding and decoding happens entirely in your browser using JavaScript. Your data never leaves your device.
- What characters does Base64 use?
- Standard Base64 uses A-Z, a-z, 0-9, +, and / (64 characters total), with = for padding. URL-safe Base64 replaces + with - and / with _ to avoid URL encoding issues.
- Can I encode images to Base64?
- Yes. Base64-encoded images can be embedded directly in HTML or CSS using data URIs. This eliminates extra HTTP requests but increases file size by ~33%. Best for small icons under 10KB.