Base64 Encode Online - Free, No Sign-Up

Overview

Base64 encoding converts binary data into a string of 64 printable ASCII characters, making it safe to embed in JSON, HTML, CSS, or email bodies. Text is encoded using TextEncoder to handle full Unicode correctly, including multi-byte characters like emoji. Switch to URL-safe mode to replace + with - and / with _ for use in query strings and JWTs.

How to Use This Tool

Type or paste text into the input, or drag a file onto the drop zone. The Base64 output appears instantly. Toggle URL-safe mode for query string or JWT use. Click Copy to grab the result or Download to save it as a .txt file.

Ready to get started? It's free, no registration required, and your files never leave your device.

PDF Tool

Frequently Asked Questions

Why does Base64 output end with == padding?

Base64 encodes 3 bytes at a time into 4 characters. If the input length is not a multiple of 3, padding characters (=) fill the last group to a multiple of 4. One = means one padding byte; == means two.

What is the size overhead of Base64 encoding?

Base64 increases data size by approximately 33%. A 100KB binary file produces roughly 133KB of Base64 text. This is relevant when embedding large images as data URIs in CSS or HTML.

Does this tool handle non-ASCII characters correctly?

Yes. The encoder uses the browser's TextEncoder API to convert text to UTF-8 bytes before Base64 encoding. Characters like Chinese, Arabic, or emoji encode correctly without data loss.