Base64 Encoder / Decoder
Encode plain text to Base64 format or decode Base64 encoded strings back to readable text.
Enter text above to see the encoded result
Base64 to Image Converter
Convert Base64 data URIs back into viewable images →
All encoding and decoding happens locally in your browser. Your data is never sent to any server, cached, or stored. Full UTF-8/Unicode support for international characters and special symbols.
Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It is everywhere on the web — embedded images, email attachments, API authentication tokens, and data URIs all rely on Base64. Our free Base64 encoder and decoder lets you instantly convert between plain text and Base64, or decode Base64 strings back to their original form, with full UTF-8/Unicode support. All processing runs locally in your browser with zero data uploads.
What Is Base64?
Base64 encodes binary data into a set of 64 printable characters (A–Z, a–z, 0–9, +, /) plus the padding character (=). It is defined in RFC 4648 and widely used to safely transmit binary data over text-based protocols like HTTP, SMTP, and JSON. Because Base64 only uses characters guaranteed to survive most transport layers, it is ideal for embedding images in HTML/CSS, encoding file contents in REST APIs, and storing binary-safe values in JSON configurations.
How to Use the Base64 Tool
- Choose your mode — Click Encode to convert text to Base64, or Decode to convert Base64 back to text.
- Enter your input — Type or paste the content you want to encode or decode into the input textarea.
- Read the result — The output panel updates instantly in real time as you type. Valid output appears in green; errors appear in red.
- Swap modes — Click the Swap button to send the output back to the input and switch modes — perfect for round-trip testing.
- Copy or clear — Use Copy to grab the result, or Clear to start fresh.
Key Features
- Real-Time Conversion
Encode and decode instantly as you type — no buttons to press.
- UTF-8 / Unicode Support
Handles international characters, emojis, and special symbols correctly.
- Encode & Decode Modes
Toggle between encoding and decoding with a single click.
- Smart Swap
Send output to input and flip modes for round-trip verification.
- Error Feedback
Clear error messages for invalid Base64 or encoding issues.
- 100% Private
All processing runs client-side. Nothing is sent to any server.
Common Use Cases
- Data URIs: Encode images as inline Base64 strings to embed directly in HTML or CSS, reducing HTTP requests.
- API Authentication: Encode
username:passwordpairs for HTTP Basic Auth headers. - Email Attachments: Base64 is the standard encoding for binary file attachments in MIME email messages.
- JWT Tokens: Decode the header and payload segments of JSON Web Tokens (each is Base64URL-encoded).
Frequently Asked Questions
What is Base64 used for?
Why is Base64 larger than the original?
Does this tool support UTF-8 characters like emojis?
btoa and atob functions
only support Latin-1, but our tool converts UTF-8 to a safe format before encoding, and restores
it after decoding — so emojis, accents, and CJK characters all work correctly.