Base64 Decoder

Decode Base64 back to text — or, when it holds a file, see what kind of file it is, preview images and download it. Errors point to the exact character.

Decoded locally in your browser — nothing is uploaded

Standard or URL-safe; whitespace and missing padding are fine.
Encode Base64 →

How it works

  1. Strips a data:…;base64, prefix if present (and notes its MIME type), and ignores whitespace.
  2. Checks every character, the position of = padding and the length. Problems are reported with their position.
  3. Converts URL-safe characters, restores missing padding and decodes to bytes.
  4. Tries to read the bytes as UTF-8 text. If they aren’t text, it checks the first bytes against known file signatures (PNG, JPEG, GIF, WebP, AVIF, SVG, PDF, ZIP, gzip, MP4, MP3, fonts). It previews images and offers a download with the right extension.

Example

SGVsbG8sIE16YW5zaSEg8J+Riw== decodes to Hello, Mzansi! 👋. The URL-safe form SGVsbG8sIE16YW5zaSEg8J-Riw gives the same result.

iVBORw0KGgo= decodes to the 8-byte PNG signature, so the decoder reports “PNG image” instead of showing unreadable characters.

SGVs*G8= gives: “*” at position 5 is not a Base64 character.

Frequently asked questions

Why does my decoded text look garbled?

The Base64 probably holds binary data (an image, PDF or compressed file), not text. The decoder detects common file types from their first bytes, previews images, and lets you download the file with the right extension.

Does it handle URL-safe Base64 and missing padding?

Yes. Standard and URL-safe (- _) Base64 are detected automatically, missing = padding is fine, and spaces and line breaks are ignored. A data: URI prefix is recognised and stripped.

What do the error messages mean?

The decoder points to the exact position of an invalid character, misplaced = padding, or a length that suggests the text was cut off — instead of quietly producing garbage. Use “Show error” to jump to the problem.

Is my data sent anywhere?

No. Decoding uses your browser’s built-in functions; nothing is uploaded. That matters because Base64 often wraps credentials, tokens and private files.

Can I decode a JWT here?

You can decode each part, but the JWT decoder does it properly: it splits the token, decodes the header and payload, explains the claims and can verify the signature.

Related tools

Encode text (UTF-8) or any file to Base64, URL-safe Base64 or a data URI, with optional MIME wrapping.

FreeRuns in your browser

Decode a JSON Web Token, check its claims and expiry, flag risks, and verify HS, RS, PS, ES or EdDSA signatures.

FreeRuns in your browser

Decode percent-encoded text, unwrap double encoding and see every query parameter of a URL in a table.

FreeRuns in your browser

Generate random v4 or time-ordered v7 UUIDs in bulk, in the format you need.

FreeRuns in your browser

Related guides