Base64 Encoder/Decoder

Encode text to Base64 or decode Base64 to text instantly. Supports full Unicode including emoji. All processing runs locally in your browser — nothing is stored or transmitted.

🔒 All processing happens locally in your browser — nothing is stored or sent to any server.

All processing happens locally in your browser — nothing is stored or sent to any server.

How to Use This Base64 Encoder/Decoder

  1. Encode: Enter any text and click Encode to get the Base64 representation.
  2. Decode: Switch to Decode mode, paste a Base64 string, and click Decode to get the original text.
  3. Copy the result with one click, or use Load sample to try it out instantly.
  4. Press Ctrl+Enter to process — or just paste and the tool auto-detects.

About Base64 Encoding

Base64 encoding represents binary data using 64 ASCII characters (uppercase A–Z, lowercase a–z, digits 0–9, plus +, and forward slash /). The equals sign = is used for padding. Because all Base64 characters are printable ASCII, it's safe to use in JSON strings, HTML attributes, email bodies, and URLs (with slight modifications).

A common use case is embedding small images directly in HTML or CSS as data URIs: <img src="data:image/png;base64,iVBOR...">. Another is storing binary configuration or API tokens in JSON config files. This tool handles the full UTF-8 character set, so you can encode emoji, international text, and special symbols without any data loss.

This tool uses your browser's built-in atob, btoa, TextEncoder, and TextDecoder APIs. It validates input strictly — invalid characters are flagged immediately rather than silently producing garbage output.

Frequently Asked Questions

What is Base64 encoding?

Base64 is a binary-to-text encoding system that converts binary data into a string of ASCII characters (A–Z, a–z, 0–9, +, /, and =). It's commonly used to embed binary data (like images) in JSON, XML, or HTML, or to safely transmit binary data over text-only protocols like HTTP or email.

How does the encoder work?

The encoder takes your text, converts it to bytes using UTF-8 (which handles any language including emoji), then maps each byte to its Base64 representation. The result is a text string you can safely store or transmit anywhere ASCII text is accepted.

How does the decoder work?

The decoder takes a Base64 string, validates that it only contains valid Base64 characters, converts it back to raw bytes, then decodes those bytes as UTF-8 text. If the input isn't valid Base64, it shows a clear error message.

Is my data sent to a server?

No. All processing happens 100% in your browser using JavaScript's built-in <code>atob</code> and <code>TextEncoder</code>/<code>TextDecoder</code> APIs. Nothing is uploaded, transmitted, or stored anywhere. You can even use this tool offline.

What's the = character at the end of some Base64 strings?

The = (equals) character is padding. Base64 encodes 3 bytes into 4 characters. When the input isn't a multiple of 3 bytes, padding is added to make the output a multiple of 4 characters. <code>Hello</code> encodes to <code>SGVsbG8=</code> (one = because 5 bytes needs 7 Base64 chars, padded to 8).

Can I encode Unicode text like emoji?

Yes. This tool uses UTF-8 encoding internally, so it correctly handles any Unicode character including emoji, CJK characters, Arabic, and special symbols. <code>Hello 🌍</code> encodes correctly without any data loss.

What's the difference between this and URL encoding?

Base64 and URL encoding (percent-encoding) serve different purposes. Base64 is for converting arbitrary binary data into ASCII text; it expands data by ~33%. URL encoding replaces special characters with %-sequences; it only affects unsafe characters. Use Base64 when you need to encode binary data; use URL encoding for query parameters.

1 people found this helpful Did we solve your problem? Thanks for your feedback!
Enjoying SlimUtils? If these free tools saved you time, consider buying us a coffee! Support on Ko-fi