Base64 Decoder

Runs in browser Encoding

Decode standard or URL-safe Base64 into UTF-8 text, detect binary content, and download the decoded bytes as a file. Invalid characters are reported clearly.

Privacy: This tool runs entirely in your browser. Your input never leaves your device.
Loading tool…

What is Base64?

Base64 represents binary data as text using 64 safe characters (A–Z, a–z, 0–9, + and /), three bytes becoming four characters, so the output is about 33% larger than the input. It exists so that binary content can travel through channels designed for text — e-mail, JSON, URLs and HTTP headers. It is an encoding, not encryption: anyone can decode it.

Security note: Base64 hides nothing. Credentials, tokens or personal data that are only Base64-encoded are effectively in plain text; use TLS in transit and real encryption at rest.

Read the guide: What is Base64? Encoding Explained

How to use Base64 Decoder

  1. Paste the Base64 string (JWT segments and data: URIs work too).
  2. Read the decoded text and the notes about repairs performed.
  3. Switch the text encoding if the result shows � characters.
  4. Copy or download the result.
Text comes out garbled when “Decode text as” does not match the bytes: é saved as UTF-8 and read as Latin-1 shows é; the other way round it shows �.
Base64 inputDecode text as
UTF-8Latin-1 / binary string
Y2Fmw6k=café saved as UTF-8caféPasscaféNo warning: every byte is valid Latin-1Fail
Y2Fm6Q==café saved as Latin-1caf�The tool warns: not valid UTF-8, try Latin-1FailcaféPass

Each cell is what the tool’s own decoder prints for that input and setting.

Base64 Decoder features

  • Decodes standard and URL-safe Base64, detecting the alphabet automatically
  • Repairs missing padding and ignores whitespace and data: URI prefixes
  • Reports invalid characters with positions; strict mode rejects them
  • Detects binary content and known file types, with a hex dump
  • Decode as UTF-8, Latin-1, UTF-16 LE or UTF-16 BE
  • Download the decoded text; live decoding as you paste

Base64 Decoder example

Decode a Base64url JWT payload

Input:

eyJzdWIiOiJ1c2VyXzhmM2EyYyIsInJvbGUiOiJhZG1pbiIsIm5vdGUiOiJ3aHk_In0

Output:

{"sub":"user_8f3a2c","role":"admin","note":"why?"}
Notes: Missing padding repaired (1 "=" added). Detected the URL-safe alphabet (Base64url).

Frequently asked questions about Base64 Decoder

The string has no "=" at the end — will it still decode?

Yes. Missing padding is added automatically and reported in the notes, so Base64url values from JWTs and URLs decode without changes.

What happens with invalid characters?

By default characters outside the alphabet (and all whitespace) are skipped and listed with their positions. Enable "Strict" to reject the input instead — useful when validating data from another system.

The output shows � or strange symbols — why?

The decoded bytes are not UTF-8 text. They may be binary (an image, ZIP or PDF — the tool detects common signatures and shows a hex dump) or text in a legacy encoding; try "Latin-1" for the latter.

Can I decode a data: URI?

Yes. Paste the whole "data:image/png;base64,…" string; the prefix is removed and the content type is reported.

Technical notes

The decoder tolerates real-world input: it strips whitespace, accepts both alphabets, pads to a multiple of four and drops a dangling character when the length is invalid (mod 4 = 1). Binary detection looks for NUL bytes, a high ratio of control characters or invalid UTF-8 sequences, and file signatures identify PNG, JPEG, GIF, PDF, ZIP, gzip and more.

References