Base64 Decode and Encode
Decode Base64 to text or to the file it holds, and encode text or any file to Base64 or a data: URL. UTF-8, URL-safe Base64 and pictures are handled, and nothing leaves your browser.
The result shows here as you type or paste.
How to use it
- 1Choose Decode or Encode. To encode a file rather than text, choose File.
- 2Paste the Base64 or type the text, or choose the file. The result follows as you type.
- 3Decoded text shows straight away. A decoded picture shows a preview, and any other file is named by its type.
- 4Copy the result, or download it.
Frequently asked questions
How do I decode Base64?
Choose Decode and paste the Base64. Line breaks, a missing = at the end, URL-safe - and _ and a data: prefix are all fine. If it holds text you see the text; if it holds a picture or another file, you can preview or download it.
Is it safe to decode my tokens or files here?
Yes. Encoding and decoding happen in your browser, on your device. Nothing you paste or open is sent anywhere or saved.
Why does Hindi or emoji text come out right here and broken elsewhere?
Text is turned into bytes as UTF-8, which covers Hindi, every other script and emoji, and read back the same way. Tools that use a browser's plain btoa can't handle these letters at all.
How do I convert an image to Base64?
Choose Encode, then File, and pick the image: files up to 10 MB can be encoded. Tick “As a data: URL” to get text you can put straight into an img tag or CSS.
What is URL-safe Base64?
It uses - and _ instead of + and /, and leaves out the = padding, so it fits in web addresses and file names. JWT tokens use it.
Related tools
- JSON Formatter and ValidatorFormat, minify and validate JSON, with any mistake shown by its line and column.
- JWT DecoderDecode a JSON Web Token, read its claims and expiry, and verify its signature.
- Regex TesterTest JavaScript regular expressions live, with every match and group highlighted.
- UUID GeneratorMake random v4 or time-ordered v7 UUIDs, one or thousands at once, and check any UUID.