All tools
Base64 Encode / Decode
Encode text to Base64 or decode Base64 back to text. Commonly used in data URLs, APIs, and encoding binary-like data as text.
About this tool
Base64 is an encoding scheme that turns binary or text data into a string of letters, numbers, and a few symbols. It is often used in data URLs, email attachments, and APIs where raw binary cannot be sent. Encoding is one-way in terms of readability; decoding restores the original.
How to use
- Paste the text you want to encode, or a Base64 string you want to decode.
- Click Encode to convert text to Base64 (e.g. for embedding in data URLs).
- Click Decode to convert Base64 back to readable text.
When to use this tool
- Creating data URLs (e.g. data:text/plain;base64,...) for embedding small assets.
- Encoding binary-like data for APIs or config that expect text.
- Decoding Base64 from API responses, emails, or certificates.
- Obfuscating or transporting text in environments that only allow safe characters.
Tips
- Standard Base64 uses A–Z, a–z, 0–9, +, and /. Padding uses =.
- Encoding non-Latin text (e.g. emoji) may require UTF-8 encoding first; browser btoa expects Latin1. For Unicode, encode to UTF-8 bytes then Base64.
FAQ
- Why does encoding fail for some text?
- btoa() in browsers only accepts Latin1 (one byte per character). Characters outside that range (e.g. many Unicode symbols) cause an error. Use a UTF-8–aware encoder for full Unicode.
- Is Base64 encryption?
- No. Base64 is encoding—anyone can decode it. Do not use it to hide secrets; use proper encryption for that.