Base64 Encoder/Decoder

Encode and decode Base64 strings and files. Runs entirely in your browser for privacy.

📝 Text to Encode

📤 Output

Features

Encode & Decode

Convert text to Base64 and back

File to Base64

Convert any file to Base64 string

Data URI Support

Generate complete data URIs for images

URL-Safe Mode

Generate URL-safe Base64 strings

Image Preview

Preview encoded images instantly

100% Private

All processing in your browser

💡 Example Use Cases

Embedding Images in CSS/HTML

Convert small images to data URIs for inline embedding, reducing HTTP requests.

API Authentication

Encode credentials for Basic Authentication headers in API requests.

Email Attachments

Encode files for MIME email attachments or debug encoded email content.

JWT Debugging

Decode Base64-encoded JWT tokens to inspect headers and payloads.

Frequently Asked Questions

Free Online Base64 Encoder and Decoder

Base64 is a binary-to-text encoding scheme that represents binary data in ASCII string format. Our tool provides instant Base64 encoding and decoding for text and files, all processed locally in your browser for complete privacy.

What is Base64 Encoding?

Base64 encoding converts binary data into a sequence of 64 printable ASCII characters (A-Z, a-z, 0-9, +, /). This makes it safe to transmit binary data through text-only systems like email or embed binary data in HTML, CSS, or JSON.

Common Base64 Use Cases

Developers frequently use Base64 for embedding images as data URIs, encoding API authentication credentials, transmitting binary files over text protocols, and encoding special characters in URLs. Our tool handles all these scenarios with options for data URI prefixes and URL-safe encoding.

URL-Safe Base64

Standard Base64 uses + and / characters which have special meaning in URLs. URL-safe Base64 replaces these with - and _, making the encoded string safe for use in URL parameters and file names.