Base64 Encoder / Decoder
Quickly encode text to Base64 or decode Base64 back to text.
Base64 is an encoding scheme for converting binary data to ASCII strings. Common uses:
- Transmitting binary data in URLs or emails
- Embedding image data in JSON or XML
- Encoding credentials (though it's not encryption)
- HTTP Basic Authentication encoding
Warning: Base64 is an encoding method, not encryption. Do not use it to protect sensitive data.
Suggested Next Steps
Related Tools
URL Encoder / Decoder
Encode and decode URLs
HTML Entity Encoder / Decoder
Encode special characters to HTML entities or decode them back
String Escape / Unescape
Escape and unescape strings for HTML, JSON, JavaScript, SQL, and more
Number Base Converter
Convert numbers between binary, octal, decimal and hexadecimal
Timestamp Converter
Convert between Unix timestamps and human-readable dates
ASCII / Unicode Lookup
Search and look up ASCII and Unicode character codes
How to Use
Paste or Type Input
Enter your text, code, or data into the input area.
Choose Options
Select the transformation or format you want to apply.
Copy the Result
Copy the output to your clipboard with one click.
Why Use This Tool
100% Free
No hidden costs, no premium tiers — every feature is free.
No Installation
Runs entirely in your browser. No software to download or install.
Private & Secure
Your data never leaves your device. Nothing is uploaded to any server.
Works on Mobile
Fully responsive — use on your phone, tablet, or desktop.
Base64 Encoding and Decoding Explained
Key Takeaways
- Base64 converts binary data into ASCII text, making it safe to transmit through text-only channels like email and JSON.
- Base64 is an encoding scheme, not encryption — it provides no security and can be decoded by anyone.
- All encoding and decoding happens in your browser — your data stays on your device.
Base64 encoding is one of the most fundamental data transformation techniques in web development. It represents binary data using 64 ASCII characters (A-Z, a-z, 0-9, +, /), enabling safe transmission of files, images, and binary content through text-based protocols. Understanding Base64 is essential for working with APIs, email systems, and data URIs.
Base64 encoding increases data size by approximately 33% compared to the original binary.
Size Overhead
Key Concepts
How Base64 Works
Base64 takes every 3 bytes (24 bits) of input and splits them into four 6-bit groups, mapping each to one of 64 printable ASCII characters. Padding with '=' is added when input length is not a multiple of 3.
Data URI Embedding
Base64-encoded images can be embedded directly in HTML and CSS using data URIs (data:image/png;base64,...), eliminating extra HTTP requests for small assets.
Email Attachments (MIME)
Email protocols like SMTP are text-based. Base64 encoding via MIME allows binary attachments like images and documents to travel safely through email systems.
Base64url Variant
The URL-safe variant replaces '+' with '-' and '/' with '_' to avoid conflicts in URLs and filenames. This variant is used extensively in JWTs and OAuth tokens.
Pro Tips
Never use Base64 for security — it is trivially reversible. Use proper encryption (AES, RSA) for sensitive data.
Avoid Base64-encoding large images inline; the 33% size increase negates the benefit of saving an HTTP request.
Use Base64url (RFC 4648 §5) instead of standard Base64 when the output will appear in URLs or filenames.
Most modern browsers support btoa() and atob() natively, but they only handle Latin-1 characters — use TextEncoder for Unicode.
All Base64 encoding and decoding is performed entirely in your browser. Your data is never transmitted to any external server, making this tool safe for sensitive content.