Encoding Tool

Base64 Encoder / Decoder

Encode or decode Base64 strings instantly. Supports standard, URL-safe, file encoding, JWT decoding and more 100% private, runs in your browser.

Advertisement — 728×90
Mode
Variant
Output Wrap
Quick Load Samples
Plain Text
0chars
0 Bsize
Base64 Output
Your encoded Base64 will appear here…
Advertisement — 728×90
🔒
100% Private

All encoding and decoding runs entirely in your browser. No data is ever sent to any server.

Instant Results

Output updates in real-time as you type. No button clicks needed for live encoding.

📎
File Encoding

Upload any file up to 5MB and get its Base64 representation instantly for data URIs.

What is Base64 & When Do You Use It?

🖼️
Inline Images
Embed images directly in HTML/CSS as data URIs no separate HTTP request needed.
🔑
JWT Tokens
JSON Web Tokens use Base64URL encoding for the header and payload sections.
📧
Email Attachments
MIME email standard uses Base64 to encode binary attachments as text.
🔐
API Authentication
HTTP Basic Auth sends credentials as Base64-encoded username:password strings.
💾
Binary Data Transfer
Transfer binary data safely through text-only channels like JSON APIs.
🔗
URL-Safe Variant
Base64URL replaces + with - and / with _ for safe use in URLs and filenames.

Standard vs URL-Safe Base64

Standard Base64
Spec: RFC 4648
Chars: A–Z, a–z, 0–9, +, /, =
Use: General encoding, email, data URIs
URL-Safe Base64
Spec: RFC 4648 §5
Chars: A–Z, a–z, 0–9, -, _, no padding
Use: JWT tokens, URLs, filenames, cookies