Base64 Encoder and Decoder
Convert text to Base64 and Base64 back to text. Accented letters, other scripts and emoji are handled correctly through UTF-8.
Runs in your browser. Your data is not uploaded.How our tools work
How do I encode or decode Base64?
Choose Encode to turn text into Base64, or Decode to turn Base64 back into text. The text is converted to UTF-8, the standard way to store text in every language, so accents and emoji round-trip correctly: café becomes Y2Fmw6k=. Invalid Base64 is explained instead of producing garbled text.
Curious how Base64 works, or where you’ll run into it? Read our guide: How to Encode and Decode Base64, and What It’s For
Key features
Every language and emoji
Text is encoded as UTF-8, so it decodes to exactly the same characters in any language.
Forgiving decoder
Accepts URL-safe Base64 (- and _), missing = padding, line breaks and a data: URL prefix.
URL-safe output
Optionally encode with - and _ and without padding, for URLs and file names.
Common uses
- Read a Base64 value from an API response, token or configuration file
- Encode text to put in a URL, header or data field
- Check what a Base64 string contains
What Base64 is, and isn’t
Base64 writes any data using 64 safe characters, so it can travel through systems that only handle text. Every 3 bytes become 4 characters, so the result is about a third larger.
Base64 is an encoding, not encryption. Anyone can decode it, so never use it to hide passwords or personal data.
Frequently Asked Questions
Why does my decoded text look wrong in other tools?
Many simple tools treat each byte as a separate character, which breaks accents and emoji. This tool decodes the bytes as UTF-8, the standard for text on the web.
What is URL-safe Base64?
A variant that uses - and _ instead of + and /, and often leaves out the = padding, so the value can be used in URLs. The decoder reads both kinds.
Can I decode an image or file?
Not to a file. If Base64 contains binary data such as an image, the tool tells you how many bytes it holds instead of showing unreadable text.
Is Base64 the same as hex?
No. Both write bytes as text, but hex uses 16 characters, two per byte, so it doubles the size, while Base64 uses 64 characters, four for every three bytes, so it adds about a third. “Hi” is 4869 in hex and SGk= in Base64.
Sources
Last updated:
Related guides & tutorials
How to Encode and Decode Base64, and What It’s For
How Base64 turns data into text, why it ends in = signs, where it’s used, how to encode and decode it, and why Base64 is encoding, not encryption.
JSON Syntax Errors Explained, and How to Fix Them
JSON syntax explained with valid and invalid examples: formatting vs minifying, indentation, and how to fix trailing commas, single quotes and other errors.