CalcCafe

Base64 to JSON

Paste Base64 and instantly get the decoded, pretty-printed JSON.

Example

Input (Base64):

eyJuYW1lIjoiSm9zw6kiLCJhZ2UiOjMwfQ==

Output (pretty-printed JSON):

{
 "name": "José",
 "age": 30
}

How it works

The input is Base64-decoded as UTF-8 bytes. If the decoded text parses as JSON it is re-emitted with 2-space indentation; otherwise the raw decoded text is shown.

Good to know

Base64 to JSON decodes a Base64 string back into its original text and, when that text is valid JSON, reformats it with 2-space indentation so you can actually read it. It is built for developers who run into Base64-encoded payloads in places like JWT bodies, API responses, environment variables, webhook bodies, message queues, or data: URIs, and need to see the underlying object structure quickly.

Reach for it whenever you have copied an opaque Base64 blob and want to confirm what it contains without writing a one-off script or pasting sensitive data into a server-side decoder. Because it runs entirely in your browser, it is safe for tokens and config secrets, and it accepts both standard Base64 (+ and /) and the URL-safe variant (- and _), so you can paste values pulled straight from URLs or JWTs.

Reading the result is straightforward: a green status with indented, brace-and-bracket output means the decoded bytes parsed as JSON. If you instead see flat text with a note that it is "not valid JSON," the Base64 decoded fine but the content was something else (plain text, a partial fragment, or malformed JSON) and is shown as-is rather than hidden. An error status instead means the input itself was not valid Base64.

A practical caveat: this tool decodes the full Base64 string as UTF-8 text, so feeding it only the middle (payload) segment of a JWT works, but pasting the entire dotted token will fail because the dots are not Base64 characters. Strip surrounding quotes, whitespace, or header/signature segments first, and remember that pretty-printing is purely cosmetic. It does not validate your JSON against a schema or change any values.

Frequently asked questions

Does it handle non-ASCII characters like accents or emoji?
Yes. The decoded bytes are interpreted as UTF-8, so accented letters, CJK characters, and emoji round-trip correctly.
What happens if the decoded text is not valid JSON?
The raw decoded text is shown in the output and the status notes that it was not valid JSON, so you still see the result.
Is my data uploaded anywhere?
No — it runs entirely in your browser. Your input never leaves your device and it works offline once loaded.
Is it free?
Yes, completely free with no sign-up and no limits.

People also ask

How do I decode the payload of a JWT to JSON?
A JWT has three dot-separated parts (header.payload.signature). Copy just the middle payload segment and paste it here. It is URL-safe Base64, which this tool accepts, and it will decode and pretty-print the claims as JSON.
What is the difference between standard and URL-safe Base64?
Standard Base64 uses + and / and may end with = padding, while URL-safe Base64 replaces + with - and / with _ so the value is safe in URLs and filenames. This tool normalizes both, so either variant decodes correctly.
Why does my Base64 decode but show as plain text instead of formatted JSON?
That means the Base64 was valid but the decoded content was not parseable JSON, for example plain text, a truncated fragment, or JSON with a syntax error such as a trailing comma. The raw decoded text is still shown so you can inspect it.
Does Base64 encrypt or secure my data?
No. Base64 is an encoding, not encryption. Anyone can reverse it back to the original bytes, so it should not be relied on to hide secrets or sensitive information.
Why am I getting an invalid Base64 error?
The input contains characters outside the Base64 alphabet, commonly dots from a full JWT, surrounding quotation marks, or stray symbols. Remove non-Base64 characters and paste only the encoded segment, then convert again.
Can I convert JSON back into Base64 with this tool?
No, this tool only goes one direction, from Base64 to decoded JSON or text. For the reverse you would need a JSON or text to Base64 encoder.
Is it safe to paste tokens and secrets into this decoder?
The decoding happens entirely in your browser and the input is not uploaded anywhere, so nothing is sent to a server. As always, avoid pasting production secrets on a device or network you do not trust.
Does it handle large Base64 inputs?
It can process sizable strings since everything runs locally, but very large inputs are limited by your browser's memory and may feel slow. For multi-megabyte payloads a local script is usually more practical.

Related tools