Base64 To Text

Decode Base64 into text - or detect and preview files

Decode standard or URL-safe Base64 (and data: URLs) back into text. If the content is a file, the type is detected and images are previewed.
Try an example:

Output will appear here...

About Base64 To Text

How it works

  1. Whitespace is removed, URL-safe characters are normalised, a data: URL prefix is stripped and missing padding is added.
  2. Each group of 4 characters is decoded back into 3 bytes.
  3. If the bytes are valid UTF-8 text, the text is shown. Otherwise the file type is identified from its first bytes ("magic numbers") and images are displayed.

What you need

  • Base64 text (standard or URL-safe) or a data:…;base64, URL.

Tips

  • Decoding a JWT? Paste just the middle part (between the two dots) to read its payload.

Limitations

  • Non-image files are identified and shown as a hex preview, but not offered as a download.

Runs in your browser. Everything happens in your browser - the text you enter is never uploaded.

Frequently asked questions

Why is the result garbled?+

The Base64 probably holds binary data or text in a non-UTF-8 encoding. This tool detects common file types; for other binary data you will see a hex preview instead.

What is URL-safe Base64?+

A variant that uses - and _ instead of + and / (which have special meanings in URLs) and usually drops the = padding. It is used in JWTs and many web APIs.