Base64 Input

Decoded JSON

What Is Base64 to JSON Decoding?

Base64 is a binary-to-text encoding scheme defined in RFC 4648 that represents binary data using 64 printable ASCII characters. It is widely used to transmit data in contexts where binary data is not safe — such as HTTP headers, JWT tokens, email attachments, and data URIs. When a JSON payload is Base64-encoded, it must be decoded before it can be read or used.

This tool decodes a Base64 string using the browser's built-in atob() function, then attempts to parse the result as JSON and pretty-print it with 2-space indentation. If the result is not valid JSON, the raw decoded text is shown instead.

How to Decode Base64 to JSON

Follow these steps to decode your Base64 string.

1

Paste the Base64 string

Paste your Base64-encoded string into the input panel. You can also click Sample to load a demo. Whitespace and newlines in the input are stripped automatically before decoding.

2

Instant decode and format

The tool decodes the Base64 string with atob() and parses the result as JSON. If valid, the output is pretty-printed with syntax highlighting. Invalid Base64 or non-JSON results are flagged with an informational message.

3

Copy the JSON

Click Copy to copy the decoded, formatted JSON to your clipboard.

Common Use Cases

JWT Token Inspection

JSON Web Tokens (JWT) consist of three Base64-encoded parts separated by dots. The header and payload segments are Base64URL-encoded JSON. Paste a JWT segment here to read the claims without needing a dedicated JWT debugger.

API Response Debugging

Some REST APIs return their response body Base64-encoded — either as a design choice or because the payload contains binary data. Decode the body here to inspect the JSON payload.

Configuration Decoding

Kubernetes secrets, CI/CD pipeline variables, and environment configurations are often stored as Base64-encoded JSON blobs. Decode them here to read or modify the configuration.

Email & Messaging Payloads

Webhook payloads delivered via email or messaging queues (e.g., AWS SQS, SNS) are sometimes Base64-encoded. Decode them here to inspect the original JSON event structure.

Frequently Asked Questions

What is the difference between standard Base64 and Base64URL?

Standard Base64 uses + and / as the 62nd and 63rd characters and may include = padding. Base64URL replaces + with - and / with _ and omits padding — making it safe for URLs and HTTP headers. This tool handles both variants automatically.

What if the decoded result is not valid JSON?

The tool shows the raw decoded text with a note that it is not valid JSON. This can happen if the Base64 encodes plain text, binary data, or a different format such as XML or CSV.

Why does atob() sometimes throw an error?

The browser's atob() throws an InvalidCharacterError if the input contains characters not in the Base64 alphabet. Common causes: accidentally copied surrounding text, line breaks in the wrong place, or a Base64URL string that needs -/_ replaced with +// first.

Is my data sent to any server?

No. All decoding and formatting happens entirely in your browser using the built-in atob() function. No data is transmitted anywhere.

How do I encode JSON to Base64?

Use our companion JSON to Base64 tool, which applies btoa(JSON.stringify(parsedJson)).

Related Tools

Explore more encoding, decoding, and JSON utilities.