Base64 Encoder

Encode text or files to Base64 instantly. Supports standard and URL-safe Base64, with optional line wrapping. Use the decoder to reverse.

Runs in your browser · No data sent anywhere
Input — plain text
Output — Base64
Copied!

Or drop a file here to encode it as Base64 data URI

Frequently Asked Questions

What is Base64 encoding?

Base64 encodes binary data using only 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). It's used to safely transmit binary data over text-based protocols like email, JSON, or URLs.

What is URL-safe Base64?

Standard Base64 uses + and / which have special meaning in URLs. URL-safe Base64 replaces + with - and / with _, making the output safe to use in URLs and filenames without percent-encoding.

Does Base64 compress data?

No — Base64 actually increases size by about 33%. It's for encoding, not compression. Use it when you need binary data in a text-safe format.

Can I encode images to Base64?

Yes. Drop an image file into the file drop zone to get a data URI you can embed directly in HTML or CSS: src="data:image/png;base64,..."