Developer Utility

Base64 Encoder & Decoder

Encode any text or file to Base64, or decode Base64 back to UTF-8 text — instantly and privately.

🔒

Fully Private

All encoding and decoding runs in your browser using the Web Crypto APIs. No upload, no logging.

🌐

URL-safe Mode

Switch to URL-safe Base64 (RFC 4648 §5) for tokens, query parameters, and filenames.

📤

File Uploads

Drop a text file straight into the encoder. UTF-8 input is fully supported.

Frequently Asked Questions

What is Base64?

Base64 is a binary-to-text encoding that uses 64 printable ASCII characters. It is the standard way to embed binary data in text-only protocols like JSON, JWT, MIME, and Data URIs.

When should I use URL-safe Base64?

Use URL-safe Base64 (no +, /, or = padding) any time the encoded value will appear in a URL, query string, JWT, or filename — anywhere "+" or "/" would need extra escaping.

Why does the output grow by ~33%?

Base64 maps every 3 input bytes to 4 output characters, so the encoded form is always about 4/3 the size of the input. That is the trade-off for being safely embeddable in text.

Can I decode binary like images here?

Decoding a binary payload as text will not produce something readable, but the underlying bytes are decoded correctly. For binary use cases, decode programmatically (e.g. into a Blob) rather than viewing as text.

Part of the Tools Lab by Azeem Shafeeq