Skip to content

Base64 Decoder

Paste a Base64 string, get the original text back, with a real error message when the input isn't valid.

How do you decode Base64?

An opaque string is sitting in a config file and you need to know what it says. Decoding reverses the encoding exactly: each group of four characters from the Base64 alphabet, A–Z, a–z, 0–9, + and /, maps back to three bytes, and those bytes are read as UTF-8 text. Paste the string and the original appears at once. Characters outside the alphabet, or a length that can't be right, produce a clear error rather than garbage.

Clean Base64 is rarer than you'd hope. Strings copied out of email or config files often carry line breaks, because many tools wrap encoded output at fixed line lengths, and strings pulled from URLs may use the URL-safe variant with - and _ in place of + and /. Trailing = padding is normal. One more caveat: Base64 carries bytes, not necessarily text: decode an encoded image and you'll get unreadable binary, because the data never was text.

Decoding a whole batch? Raw strings in one column, decoded values in the next: paired columns in a Ferra table make every row checkable at a glance.

How the Base64 Decoder works

Paste the encoded string; the decoder maps it back to bytes, reads those bytes as UTF-8, and shows the text. Invalid input, a stray character, an impossible length, triggers an error message instead of a corrupted result, so a failed decode always means the input was the problem.

Base64
The encoded string and nothing else. Leave out prefixes like data:image/png;base64, and trim any surrounding text before pasting.

Making sense of the result

Paste U3RhdHVzOiBhY3RpdmU= and back comes Status: active. The arithmetic: 20 encoded characters map to 14 bytes, four characters per three bytes, the single = marking a final group that carried only two, and those bytes read directly as the original text.

A failed decode usually means you pasted more than the Base64. A data URI like data:text/plain;base64,U3RhdHVzOiBhY3RpdmU= carries a prefix that isn't part of the encoding, and copied strings pick up stray spaces and line breaks along the way. Strip everything before the comma, trim the whitespace, and try again.

When to use the Base64 Decoder

Opaque strings cross your desk constantly: a value in an environment variable, a field in a webhook payload, an authorization header in a request log, the payload segment of a token. Decoding takes seconds and often answers the actual question: right credential? right config? right account? without touching any code.

Your own pipeline deserves the same check. If a system encodes values before storing or sending them, decode a sample from the far end to confirm the round trip is clean. A decoded value that comes back subtly wrong is an encoding bug worth chasing: usually a character-set problem or double encoding.

Tips for the Base64 Decoder

Nearly every failed decode is an input problem, not a data problem. Run these checks in order.

Strip prefixes first
data: URI headers and anything else ahead of the payload don't belong in the box. Only the Base64 itself decodes.
Watch for the URL-safe variant
A string containing - or _ uses the URL-safe alphabet. Swap those back to + and / when the decoder rejects it.
Remove line breaks
Encoded text copied from email or certificates often arrives wrapped across lines. Join it into one continuous string before decoding.
Expect binary sometimes
Output that's all unreadable symbols usually means the original was a file, not text. The decode can be correct without being readable.
Decode before you escalate
Before filing a bug about a "corrupted" value, decode it. Surprisingly often the value is fine and the handling around it is what broke.

Related templates

Browse all templates