Free Developer Tool

Base64 Encoder & Decoder

Encode text or files to Base64, or decode Base64 strings back to plain text. Instant, private, and free.

✓ Text encoding✓ File to Base64✓ URL-safe mode✓ Offline-ready✓ No signup
Plain Text Input
Base64 Output
Input: 0 chars
Output: 0 chars
Ratio:

Common Uses of Base64

Email Attachments

MIME email format uses Base64 to encode binary attachments for safe text-based transmission.

Data URLs

Embed small images directly in HTML/CSS as data:image/png;base64,... to reduce HTTP requests.

API Authentication

HTTP Basic Auth encodes credentials as Base64. JWT tokens use Base64URL for the header and payload.

JSON Payloads

Encode binary data (images, PDFs) as Base64 strings to include them safely in JSON API responses.

CSS Background Images

Inline small icons as Base64 encoded background-image values to eliminate extra network requests.

Database Storage

Store binary file data as Base64 strings in text columns when binary columns aren't available.