HOW-TO

How to decode Base64

Decode a Base64 string back to its original text or bytes. Free online tool plus the decode one-liner in each language.

Decoding Base64 reverses the encoding to recover the original bytes. It always works — Base64 is not encrypted, just re-encoded. Here is how to decode online and in code.

Online

Paste the Base64 string into our tool and choose decode to get the original text back. If decoding fails, the input is not valid Base64 — check for stray whitespace, a missing character, or that it is actually Base64URL (which uses - and _).

In code

JavaScript: atob(str) or Buffer.from(str, "base64"). Python: base64.b64decode(s). PHP: base64_decode($s). Go: base64.StdEncoding.DecodeString(s). For JWTs and URLs, decode with the URL-safe alphabet.

Step by step

1

Open the Base64 tool and paste the encoded string.

2

Select "decode" to recover the original text.

3

If it errors, verify the input is valid Base64 (or Base64URL) with no stray characters.

Try it now — free, no signup

Use the Base64 tool in your browser. Then, when you need it at scale with an API key and higher limits, grab the full Eveses API.

FAQ

Why does my Base64 fail to decode?›
Usually stray whitespace, a truncated string, or Base64URL input decoded as standard Base64 (it uses - and _ instead of + and /).
Can all Base64 be decoded?›
Yes — it is fully reversible with no key.

Related