Base64 Encoder / Decoder
Encode and decode base64 text, including a URL-safe variant.
Mode
Text
Output
The result appears here.
More in this kitAll of Developer Utilities
About Base64 Encoder / Decoder
Base64 represents binary data or arbitrary text using only letters, digits and a couple of symbols, which makes it safe to paste into JSON, URLs, email headers and config files. This tool encodes text to Base64 and decodes it back, with an optional URL-safe alphabet.
How to use it
- Choose Encode or Decode.
- Paste or type your text into the input panel.
- Switch on URL-safe if the result needs to travel inside a URL or filename.
- Copy the output.
Good to know
- Text is converted using UTF-8, so accented letters, emoji and non-Latin scripts round-trip correctly.
- The URL-safe variant swaps the plus and slash characters for a hyphen and an underscore, which are safe in web addresses.
- Base64 is an encoding, not encryption. Anyone can decode it, so never treat it as a way to hide secrets.
Common questions
Why does decoding sometimes fail?
Decoding fails when the input contains characters outside the Base64 alphabet or is truncated. Check for stray spaces, missing padding or a URL-safe string being decoded without the URL-safe option.
Can I encode a file with this?
This tool works on text. To turn an image into a Base64 data URI, use the Image to Base64 tool in the Image Toolkit.