Base64 Encode Decode
Encode plain text to Base64 or decode a Base64 string back to text. Uses the browser’s built-in btoa/atob (for ASCII) or TextEncoder/TextDecoder for Unicode. Handy for APIs, data URLs, or quick encoding checks. All processing is local.
Encode or decode
Enter text and encode or decode.
How it works
Base64 encodes binary data as ASCII text using 64 characters (A–Z, a–z, 0–9, +, /). Encode: text → bytes → Base64. Decode: Base64 → bytes → text. For Unicode we use TextEncoder/TextDecoder; invalid Base64 on decode shows an error.
When to use it
Use it to encode credentials or small payloads for headers, to decode API responses, or to build data URLs. Not for passwords—use proper hashing instead.
Frequently asked questions
- Is my data sent to a server? No. Encoding and decoding run in your browser only.
- Why does Unicode sometimes fail with btoa? btoa expects Latin1. We use TextEncoder when available so Unicode text encodes correctly.