"category": "format-converter",
Base64 to JSON Decoder
"tldr": Paste a Base64 string and get pretty-printed JSON - works for JWT segments, Kubernetes secrets, and webhook payloads.
Decode a Base64 string back into pretty-printed JSON. Paste an encoded payload from a Kubernetes secret, an environment variable, a webhook signature header, or a JWT segment and instantly see the structured data inside.
The decoder verifies that the result is valid JSON and formats it with 2-space indentation. Decoding happens entirely in your browser, which matters when the payload is a secret or token you should not paste into an unknown server.
How to decode Base64 to JSON
- 1Paste the Base64 string into the input panel - whitespace and line breaks are ignored.
- 2The tool decodes the bytes as UTF-8 text.
- 3The text is parsed as JSON and pretty-printed with 2-space indentation.
- 4Copy the readable JSON output.
Convert Base64 to JSON in code
import base64, json
encoded = "eyJzZXJ2aWNlIjoicGF5bWVudHMtYXBpIn0="
data = json.loads(base64.b64decode(encoded))
print(json.dumps(data, indent=2))const binary = atob(encoded);
const bytes = Uint8Array.from(binary, c => c.charCodeAt(0));
const data = JSON.parse(new TextDecoder().decode(bytes));Frequently asked questions
Can I decode a JWT with this tool?
Yes, segment by segment. A JWT is three Base64url parts separated by dots - decode the first for the header and the second for the payload (claims). If decoding fails, replace - with + and _ with / first, since JWTs use the URL-safe alphabet.
Why do I get "not Base64-encoded JSON" for a valid-looking string?
Either the bytes are not Base64 at all, or they decode to something other than JSON - plain text, a binary blob, or double-encoded Base64. Try decoding once and inspecting the intermediate result; nested encodings need multiple passes.
Is it safe to paste tokens and secrets here?
Decoding runs entirely in your browser with no network requests, so nothing is transmitted or logged. That said, treat any decoded secret as sensitive - clear your clipboard and avoid screenshots.
What about padding (= signs) at the end?
Padding makes the encoded length a multiple of four and is often stripped in URLs and JWTs. The decoder tolerates missing padding in most cases; if decoding fails, append = or == until the length is divisible by four.
Last updated:
You might also need
Free and in-browser, like everything on JSON Console. Browse all tools →