Encode & Decode Base64
Text · Files · URL-Safe
Encode text or files to Base64, decode Base64 strings, with URL-safe mode, line wrapping, and size overhead calculation.
Why Use Our Base64 Tool
Encode and decode with advanced options
Encode & Decode
Switch between encoding and decoding modes instantly
File Support
Convert files to Base64 data URIs with drag and drop
URL-Safe Mode
Output safe for URLs by replacing +/ with -_ characters
Line Wrapping
MIME-compliant 76-character line wrapping option
Size Overhead
See the exact size increase from Base64 encoding
Unicode Support
Handle any text including emoji and special characters
Complete Guide: How to Use the Base64 Encoder / Decoder
Base64 encoding converts binary data into ASCII text, making it safe to transmit through text-only channels like email, JSON, or URLs. Our tool encodes and decodes Base64 instantly in your browser — no data is sent to any server. It's essential for web developers, API integrators, and anyone working with encoded data.
Step-by-Step Instructions
- 1
Choose your mode
Select 'Encode' to convert plain text to Base64, or 'Decode' to convert Base64 back to readable text. The interface adjusts accordingly.
- 2
Paste or type your input
Enter the text you want to encode (or the Base64 string you want to decode) in the input area. There's no size limit for typical use cases.
- 3
Get instant results
The output appears immediately in the result area. For encoding, you get the Base64 string; for decoding, you get the original text.
- 4
Copy or download
Click the copy button to copy the result to your clipboard, or use the download button for larger outputs.
Common Use Cases
- ✓Embedding images in HTML/CSS using data URIs (data:image/png;base64,...)
- ✓Encoding API authentication credentials (HTTP Basic Auth uses Base64)
- ✓Transmitting binary data in JSON payloads that only support text
- ✓Encoding email attachments (MIME uses Base64)
- ✓Debugging encoded strings in API responses or JWT tokens
- ✓Storing small binary blobs in text-based configuration files
Pro Tips
Related Tools
Password Generator
Generate strong, secure random passwords instantly. Customize length, characters, and complexity.
JSON Formatter & Validator
Format, beautify and validate JSON data online. Pretty print JSON with syntax highlighting.
Hash Generator (MD5 / SHA256)
Generate MD5, SHA-1, SHA-256 and SHA-512 hashes from any text online. Free cryptographic hash calculator.
URL Encoder / Decoder
Encode or decode URLs online. Percent-encode special characters for safe URL usage.
Frequently Asked Questions
What is Base64 encoding?
Base64 is a binary-to-text encoding scheme that represents binary data as an ASCII string. It is commonly used to embed binary data in text-based formats like JSON, XML, or email attachments.
Does this tool support Unicode characters?
Yes! Our Base64 encoder/decoder fully supports Unicode characters including emojis, accented characters, and non-Latin scripts.
Is Base64 encoding the same as encryption?
No. Base64 is an encoding scheme, not encryption. Anyone can decode a Base64 string. Do not use Base64 to protect sensitive data.
Why is the Base64 output longer than the input?
Base64 encoding increases the size of data by approximately 33%. This is because it uses 6 bits per character instead of 8, requiring more characters to represent the same data.
