Skip to main content
Toolzum

Base64 Encode/Decode

Encodes text or small files into Base64 strings and decodes them back with automatic MIME-type detection for binary safety. Code never leaves your device — formatting and validation run locally in your browser.

100% Local Browser Native

How to Use the Base64 Encode/Decode

1. Paste Base64

Paste Base64 text into the input area. Nothing runs until you trigger it.

2. Encode

Encode to the target format.

3. Copy encoded

Copy the encoded output.

Similar Tools You Might Need

See all

Frequently Asked Questions

When should I use Base64?

Embedding small images in CSS/HTML data URIs, passing binary through JSON APIs, and encoding credentials for Basic auth headers. It is an encoding, not encryption — anyone can decode it.

Why is the output ~33% larger?

Base64 maps every 3 bytes to 4 ASCII characters by design. A 3MB file becomes ~4MB of text — fine for small assets, wasteful for large ones.

How do data URIs work?

Prefix the output like data:image/png;base64,iVBOR… and browsers render it inline. Handy for single-file HTML exports and email signatures with tiny logos.

Does it handle Unicode text?

Yes — text is UTF-8 encoded before conversion, so emoji and non-Latin scripts round-trip correctly, unlike naive btoa() snippets that corrupt them.

When using Base64 Encode/Decode, are my files uploaded?

No. Encoding runs entirely in your browser. Files and text never leave your device.

Which of the 10 schemes handle emoji?

The Scheme menu lists 10: Base64, Base64URL, URL, HTML Entity, Hex, Binary, ROT13, UTF-8, Unicode Escape and Backslash Escape. Base64 and Base64URL call btoa() directly, so non-Latin-1 text errors with 'use the UTF-8 scheme for Unicode/emoji' - pick UTF-8 hex bytes or Unicode Escape (\u plus 4 hex digits) instead. Hex uses 2 digits per char, Binary 8 bits per char.

Last updated October 2026