Base64 Encoder / Decoder
Encode plain text into Base64, or decode Base64 back into readable text.
Base64 turns arbitrary bytes - text, but also images, files, or anything else - into a string using only 64 printable characters, so it can safely travel through channels that only understand plain text: URLs, JSON, email, config files, and more. This tool encodes and decodes it instantly, entirely in your browser.
How it works
Encoding first converts your text into raw UTF-8 bytes, then maps every 3 bytes onto 4 Base64 characters (A-Z, a-z, 0-9, +, /). Decoding reverses that: Base64 characters back to bytes, then bytes back to text. Both directions run using your browser's own btoa/atob functions - nothing is sent anywhere to do it.
Base64 is not encryption
It's easy to mistake Base64 for a security measure because the output looks scrambled, but it isn't - it's just a different way of writing the same data, and anyone can decode it instantly with no key or password. Don't use it to hide sensitive information; use it only when you need text-safe data, not secret data.
When to use it
- Embedding small binary data (like an image) inside JSON, XML, or a URL.
- Working with APIs that require Base64-encoded request or response bodies.
- Reading data: URIs, email attachments, or JWT tokens, which are Base64 under the hood.
Common mistakes
- Assuming Base64 provides privacy or security - it doesn't, see above.
- Feeding plain text with special characters straight through
btoa()in JavaScript without handling UTF-8 first - this tool does that conversion for you automatically, so emoji and accented letters round-trip correctly. - Pasting truncated or whitespace-mangled Base64 (e.g. from a line-wrapped email) and expecting it to decode cleanly.
Frequently asked questions
Is Base64 encryption?
No - it's an encoding, not a cipher. Anyone can decode it with no key required.
Why does my decoded text look garbled?
Usually because the original Base64 was incomplete or altered (e.g. truncated by another tool, or line breaks/whitespace inserted) - decoding partial or corrupted Base64 produces partial or corrupted output.
Why is the encoded text longer than my original text?
Base64 represents every 3 bytes as 4 characters, so the output is roughly a third larger than the input - that overhead is the cost of making binary-safe data text-safe.
Can I encode more than text, like images?
Yes, Base64 works on any bytes - see the Image to Base64 tool if that's specifically what you need.
Is my text uploaded anywhere?
No. Encoding and decoding both happen entirely in your browser.
Related tools
Browse the rest of the Text & Data tools on NeatSize.
Runs entirely in your browser - nothing you enter or upload is sent to a server.
Need it to do something else? Request a tool