How to Decode Base64 Online (and in Code)

Base64 decoding reverses the encoding: it turns the 64-character text back into the original bytes. Here's how to do it everywhere.

Decode online

The fastest way is the Base64 decoder — paste the encoded string, switch to decode mode, and read the result. It runs entirely in your browser, so sensitive data never leaves your machine.

Decode in JavaScript

In the browser, use atob:

const text = atob('SGVsbG8=');   // "Hello"

For UTF-8 (accents, emoji), atob alone mangles multibyte characters. Decode safely with:

const bytes = Uint8Array.from(atob(b64), c => c.charCodeAt(0));
const text = new TextDecoder().decode(bytes);

Decode in Python

import base64
base64.b64decode("SGVsbG8=").decode("utf-8")   # "Hello"

Decode on the command line

echo "SGVsbG8=" | base64 --decode

Common gotchas

  • Wrong padding — Base64 length must be a multiple of 4. Missing = padding causes errors.
  • URL-safe variants — some tokens use - and _ instead of + and /. See URL-safe Base64.
  • UTF-8 — always decode bytes, then convert to text, or non-ASCII breaks.

Related

Once decoded, if you have JSON, clean it up with the config validator. Working with tokens? Try the JWT decoder, which Base64-decodes each segment for you.

Got a config file to check?

Open the config toolkit →