Base64 Decoder

100% client-side processing (no server upload). Decode Base64 back to text with charset control, optional data:*;base64, prefix stripping, strict validation, and predictable output formatting.

Loading…

About Base64 Decode (Text)

Paste Base64 input (standard, Base64url, or MIME-wrapped), pick the right character set, and click "Decode". You'll get deterministic text output with clear errors when the input is malformed. Need the opposite direction? Use the other page.

Features

  • Decodes standard Base64, Base64url, and MIME-wrapped Base64 via a "Format" preset
  • Character set selector for byte-accurate text recovery (unsupported charsets fall back to UTF-8)
  • Optionally strips data:*;base64, prefixes before decoding (useful for pasted Data URIs)
  • Strict validation mode to reject invalid characters/padding for debugging
  • Live preview for small inputs, plus optional line-by-line processing
  • 100% client-side processing (no server upload).

How to use for base64-decoder

1

Paste or drop Base64 input

Paste your Base64/Base64url/MIME text into the editor (or drop a text file). If your value starts with "data:*;base64," you can keep the prefix enabled to auto-strip it.

2

Click "Decode"

Select "Decode", then choose the expected "Character set" and "Format" (Standard, URL-safe, or MIME). Enable "Strict validation" if you want the tool to reject malformed input.

3

Copy or download the result

Copy the decoded text from the output editor or download it. If the output looks garbled, try a different character set and re-run.

Technical specifications

Execution Model

This tool runs entirely in your browser and never uploads your data.

AspectDetail
Runtime100% client-side processing (no server upload).
Action scopeDecoding only (this page)
InputText Base64 / Base64url / MIME-wrapped Base64 (optionally with data:*;base64, prefix)
OutputDecoded text (bytes interpreted using the selected character set)
Limits~1–2MB chars; ~25000 ms timeout
RetentionAll processing happens locally in your browser (no upload)
Even though processing is local, avoid pasting secrets into browser tools on shared devices. Prefer local CLI tooling for sensitive material.

Mini Example

A tiny decode round-trip sample (standard Base64).

Input: SGVsbG8gV29ybGQ=
Output: Hello World
If your source system used a non-UTF-8 byte encoding, select the matching "Character set" for correct text output.

Errors & Edge Cases

Most decode failures come from malformed Base64, a mismatched preset (standard vs url-safe vs MIME), or the wrong charset assumption.

SymptomLikely causeWhat to check
Decode fails with invalid character/padding errorInput contains non-Base64 characters or bad padding; strict mode may reject what others acceptSet "Format" correctly, disable "Strict validation" to be more permissive, or remove stray whitespace/quotes
Output looks like "mojibake" (garbled text)Wrong "Character set" used to interpret decoded bytesTry UTF-8 first; if the source was legacy, test ISO-8859-1 or Windows-1252 (supported); other values fall back to UTF-8
Works in another tool but not hereDifferent handling of Base64url, MIME wrapping, or paddingPick the correct preset (Standard/Base64url/MIME) and adjust "Padding (=)" if needed
Data URI failsPrefix not stripped or input includes non-base64 metadataEnable "Accept data:*;base64, prefix" so the tool strips everything before the comma

Command line

For secrets, automation, or CI, prefer decoding locally with well-known tools.

macOS / Linux (OpenSSL)

Decode Base64 to bytes (then interpret as text in your terminal/editor)

printf %s 'SGVsbG8gV29ybGQ=' | openssl base64 -d

Use OpenSSL for standard Base64. For Base64url, first map "-"→"+" and "_"→"/" and add padding as needed.

All platforms (Python)

Decode Base64 / Base64url to text with explicit UTF-8 decoding

python -c 'import base64; s='SGVsbG8gV29ybGQ='; print(base64.b64decode(s).decode('utf-8'))

Python's base64 module supports standard and URL-safe decoding (use base64.urlsafe_b64decode for Base64url). Decode bytes using the correct charset for your data.

Node.js

Decode Base64 string to UTF-8 text

node -e 'const s='SGVsbG8gV29ybGQ='; console.log(Buffer.from(s,'base64').toString('utf8'));

Node Buffer handles standard Base64. For Base64url, normalize "-"/"_" and padding first, or use a helper that supports Base64url directly.

Use cases

Decode API tokens and payload fragments for inspection

  • Quickly inspect Base64 fields returned by APIs without uploading data
  • Validate whether a value is standard Base64 vs Base64url

Debug MIME-wrapped Base64 in emails or PEM-like content

  • Handle wrapped lines and CRLF separators when pasting from emails
  • Confirm "MIME" formatting is the reason another decoder fails

CI sanity checks for generated Base64 strings

  • Spot invalid padding/characters early with "Strict validation"
  • Verify deterministic decode output across environments

Safer handling of sensitive material

  • Prefer local decoding when dealing with secrets and regulated data
  • Avoid copying decoded output into shared logs or ticket systems

❓ Frequently Asked Questions

Is there a public API?

No. This page is an in-browser tool and its internal endpoints are not exposed as a public API.

Is processing local or remote?

100% client-side processing (no server upload). All decoding happens locally in your browser.

Can I decode secrets (API keys, tokens, credentials) here?

It's safer to avoid pasting secrets into browser tools, especially on shared devices. Prefer local command-line decoding for sensitive data.

Why does decoding fail with "invalid Base64" or "padding" errors?

Common causes are the wrong "Format" preset (Standard vs URL-safe vs MIME), missing/extra padding, or stray characters (quotes, spaces, newlines). Try the correct preset, enable "Accept data:*;base64, prefix" for Data URIs, and toggle "Strict validation" depending on whether you want permissive vs strict parsing.

Pro Tips

Best Practice

If you're decoding Base64url, start by selecting the URL-safe preset; it avoids common "-"/"_" confusion.

Best Practice

If the decoded text looks wrong, don't assume the Base64 is invalid—switch the "Character set" (UTF-8 vs ISO-8859-1/Windows-1252) to match the original bytes.

CI Tip

Turn on "Strict validation" when debugging pipelines: it helps catch hidden whitespace, bad padding, and non-Base64 characters early.

Security Tip

For secrets and production data, prefer local decoding (OpenSSL/Python/Node) and avoid pasting sensitive payloads into the browser.

Additional Resources

Other Tools