LocalExcelTool
Get started

Base64 Decode

Decode Base64 strings back to text, locally and safely.

Runs in your browserNo account neededFree

What is Base64 Decode

Base64 decoding converts a Base64-encoded string back into its original text or binary data.

🔒 Everything runs in your browser. Nothing is uploaded.

What this tool actually does with your file

Where it runs
In your browser, on this page
Upload
None — the file never leaves your device
Offline
Works with the network disconnected

Decoding is a byte operation, not a text operation

The decoder walks the string four characters at a time, rebuilds three bytes from each group, then attempts to interpret the resulting bytes as UTF-8. If the bytes were never UTF-8 — a PNG, a ZIP, a PDF — the interpretation produces replacement characters or nonsense, and that is not a bug: the payload simply is not text.

This is the single most common confusion with Base64. A JPEG encoded to Base64 and then decoded back to a text box looks like garbage because an image is not text. The round trip only preserves information when the bytes are treated as bytes the whole way through, which is why file-oriented decoding should download a file instead of printing to a textarea.

Three ways a valid string fails to decode

First, the plus sign in transit. A query string uses application/x-www-form-urlencoded rules, where + means space. Any Base64 passed as a raw query parameter will therefore decode with spaces where plus signs used to be — one flipped bit per occurrence, no error raised. Pass it percent-encoded, or use the URL-safe alphabet.

Second, invisible corruption. Missing padding, a truncated tail, or a smart quote pasted along with the string all break the four-character alignment. A tolerant decoder may silently drop the tail and hand you a file that is three bytes short, which then fails its own checksum. Third, double encoding: if the decoded result still contains %xx sequences, the original was encoded twice and you need one more pass.

Sanity checks before trusting the result

On any binary output, verify the first bytes rather than the extension: files start with recognisable magics (PNG 89 50 4E 47, JPEG FF D8 FF, PDF 25 50 44 46, ZIP 50 4B 03 04). A file that decodes and then will not open almost always has the wrong magic, which tells you the source string was truncated or was never that format.

For text payloads, if the decoded result contains the replacement character U+FFFD, the bytes were not valid UTF-8 — the content may be Latin-1, Shift-JIS or GBK. Re-decode with the right charset instead of editing the output by hand.

How to use it

  1. 1.Paste Base64 string
  2. 2.Click Decode
  3. 3.View the result

How Base64 Decode works under the hood

Encoding tools convert between representations of the same bytes: Base64, percent-encoding, hex, HTML entities, Unicode escapes. A correct encoder is reversible; a lossy one silently changes the data.

  1. 1

    Get the exact bytes

    Text is encoded to UTF-8 bytes with TextEncoder first; binary input is read as an ArrayBuffer. Encoding the wrong byte sequence is the most common cause of a wrong result.

  2. 2

    Apply the encoding rule

    Each format has an exact specification: Base64 uses a 64-symbol alphabet with padding, percent-encoding escapes reserved characters as UTF-8 bytes.

  3. 3

    Decode back to verify

    Round-tripping the output back to the input is the only honest proof that an encoder is correct. The tool keeps the reverse path available on the same page.

  4. Processing pipeline

Base64 is not encryption

Base64 increases size by about a third and hides nothing: anyone can decode it. It exists to carry binary data through text-only channels such as JSON, email headers and data URLs. If you need confidentiality, use encryption with a key, not an encoding.

Where encoders break

Percent-encoding applied twice turns %20 into %2520; Base64 without padding fails strict decoders; UTF-16 input decoded as UTF-8 produces replacement characters that cannot be recovered. When output looks wrong, check the byte sequence before checking the tool.

Verify it yourself

Encoders are pure functions over bytes. Decode the output again and you should get the input back exactly.

  1. 1.Open DevTools on this page and switch to the Network tab
  2. 2.Keep the filter on Fetch/XHR and run the tool
  3. 3.Confirm no request carries your file — you should see only page assets and fonts

Frequently asked questions

What is Base64 decoding?

It converts a Base64 string back into the original data.

What about invalid input?

An error is shown if the string cannot be decoded.

Is it safe?

Yes, it runs entirely in your browser.

What this kind of conversion cannot keep

Encoding and hashing run through the browser's Web Crypto API or a pure-JavaScript implementation. The output is deterministic: the same input always produces the same digest, so you can verify a result against any other tool.

More in Encoding