Base64 Encoder & Decoder
Convert text to Base64 or decode Base64 back to readable text — instantly, in your browser.
How to Encode or Decode Base64
- Choose "Encode" or "Decode" using the pill toggle at the top of the tool.
- Paste your text (to encode) or your Base64 string (to decode) into the input box.
- Click the action button — it reads "Encode to Base64" or "Decode from Base64" depending on the mode selected.
- Click "Copy Result" to copy the output, or "Clear" to reset both fields.
Frequently Asked Questions
Is Base64 encryption?
No — Base64 is a reversible encoding, not encryption. Anyone can decode it back to the original text with this same tool or any other Base64 decoder, so it should never be used to hide sensitive data.
Why does decoding sometimes fail with "doesn't look like valid Base64"?
The decoder calls the browser's atob() function, which throws an error on strings that aren't valid Base64, such as wrong characters or incorrect padding. The tool catches that error and shows the message instead of leaving the result blank.
Does it handle Unicode text correctly, not just plain ASCII?
Yes — before encoding, the tool runs your text through TextEncoder to convert it to UTF-8 bytes first, so emoji and non-English characters encode and decode correctly instead of getting mangled the way a plain btoa(text) call would.
What actually happens when I click Encode?
Your text is converted to UTF-8 bytes, those bytes are mapped to a binary string, and that binary string is passed to the browser's native btoa() function, which produces the standard Base64 output.
Can I convert files, not just text?
No — this tool only accepts pasted text; it doesn't read file uploads, so it's meant for encoding or decoding strings like API tokens or small JSON blobs rather than binary files.