B6
100% Client-SideAbout

Base64 Encoder & Decoder

Encode and decode text, images, and files instantly — right in your browser.

What is Base64 Encoding?

Base64 is a binary-to-text encoding scheme that represents binary data as printable ASCII characters. It's widely used in web development, email systems, and data storage to safely transmit binary content through text-only channels. Every three bytes of input become four characters of output, using the characters A–Z, a–z, 0–9, +, and /.

This tool lets you encode and decode Base64 for text, images, and files entirely in your browser. Nothing is uploaded to a server — your data stays private. It supports full UTF-8 text (not just ASCII), image-to-data-URI conversion, and URL-safe Base64 (replacing + and / with - and _) for use in URLs and filenames without additional escaping.

Common uses include embedding images directly in HTML and CSS as data: URIs, encoding credentials for HTTP Basic Authentication headers, passing binary data through JSON APIs, and encoding email attachments in MIME format. Developers also reach for Base64 when storing binary content in configuration files, environment variables, or databases that only accept text.

Frequently Asked Questions

How do I encode text to Base64?

Select the Text tab and make sure Encode mode is active. Type or paste your text into the left panel — the result appears instantly on the right. Click Copy to grab it.

How do I decode a Base64 string back to text?

Select the Text tab, switch to Decode mode, and paste your Base64 string into the left panel. The decoded text appears on the right immediately.

How do I convert an image to Base64?

Select the Image tab and drag your image (PNG, JPG, GIF, WebP, or SVG) onto the drop zone, or click to browse. The tool generates a data URI you can embed directly in HTML or CSS.

What is URL-safe Base64?

URL-safe Base64 replaces + and / with - and _, and removes padding. Use it in URLs, query parameters, filenames, and JWTs — toggle the URL-Safe switch at the top of the tool.

Is my data uploaded to a server?

No. Every operation happens entirely in your browser using built-in Web APIs. Your files, images, and text never leave your device — safe for API keys, tokens, and private documents.

Does Base64 encoding work with Unicode and emoji?

Yes. This tool uses TextEncoder to handle the full UTF-8 range, including emoji, Arabic, Chinese, and other non-ASCII characters — unlike the native btoa() which is limited to Latin-1.