How to decode Base64 to JSON
- Paste the string: standard Base64, Base64URL or a
data:URL. Spaces, line breaks and missing=padding are fine. - Pick the JSON Indent: 2 spaces, 4 spaces or tabs.
Example
JSON often arrives Base64-encoded in message queue payloads, webhook bodies, Kubernetes Secrets and the first two parts of a JWT. This string:
eyJvcmRlcklkIjoiU08tNTUyMSIsInN0YXR1cyI6InNoaXBwZWQiLCJjYXJyaWVyIjoiREhMIiwiaXRlbXMiOjMsImV0YSI6IjIwMjYtMTEtMDcifQ==
decodes to:
{
"orderId": "SO-5521",
"status": "shipped",
"carrier": "DHL",
"items": 3,
"eta": "2026-11-07"
}
Base64 or Base64URL
Base64 uses + and / and pads with =. Base64URL (RFC 4648, section 5) uses - and _ and usually drops the padding, so it fits in URLs and tokens. The same object in both forms:
eyJxIjoiw6k/Pj5+fn4iLCJvayI6dHJ1ZX0=
eyJxIjoiw6k_Pj5-fn4iLCJvayI6dHJ1ZX0
Both decode alike; the second adds the note Read as Base64URL. For a whole token with its claims and expiry, use the JWT decoder.
When the result is not JSON
- Plain text such as
user=ana&role=adminis shown as text, with the noteDecoded, but the result is not JSON. Shown as plain text. - Gzip data starts with
H4sIwhen encoded and decodes to noise. Decompress it first (below). - Other encodings. Bytes are read as UTF-8, so UTF-16 text comes out garbled.
- JSON inside a string. A single quoted string full of
\"was stringified before encoding: unescape it with JSON escape, then format it in the JSON formatter.
To decode gzip data on Linux or macOS:
echo 'H4sIAAAAAAAACqtWSlSyMqwFAK+sG1YHAAAA' | base64 --decode | gunzip
It prints {"a":1}.