Skip to content
Utilboxes

Base64 Decoder

Decode Base64 back to text, or recover the original file. URL-safe input and data URIs are handled automatically.

Runs entirely in your browser

How to use the Base64 Decoder

  1. 1Paste the Base64 string, or a complete data URI.
  2. 2The decoded text appears immediately.
  3. 3If the data is binary, use the download button to save it as a file.
  4. 4Copy the text if that is what you needed.

How it works

Input is normalised before decoding: URL-safe characters are converted back, whitespace and line breaks are stripped, and missing padding is restored. That means a string copied out of a wrapped email header decodes without manual cleanup.

The decoded bytes are then examined. If they form valid UTF-8, the text is shown directly. If not, the data is binary, and the first bytes are checked against known file signatures to identify what it is — PNG, JPEG, PDF, ZIP and so on — so the download gets a sensible name and type.

Invalid Base64 is reported clearly. The most common causes are a truncated string, a mix of standard and URL-safe alphabets, or stray characters picked up during copying.

Everything runs in this page. Nothing you paste is transmitted, logged or stored, which is what makes it safe to drop a production payload in here while you are debugging.

Frequently asked questions

Why does my Base64 fail to decode?
Usually because it is truncated, has missing padding, or mixes the standard and URL-safe alphabets. Padding and whitespace are corrected automatically, so a genuine failure normally means the string is incomplete.
How do I decode a Base64 image?
Paste the string, including the data:image/... prefix if you have it. The type is detected and a download button appears.
Can I decode without knowing the original format?
Yes. The decoded bytes are inspected — valid UTF-8 is shown as text, and binary data is identified by its file signature.