What Base64 to JSON does
Decode Base64 and pretty-print the JSON. Text is handled as UTF-8, so accented letters, other scripts and emoji survive the round trip.
Base64 to JSON examples
The built-in sample
Input
eyJuYW1lIjoiQWRhIExvdmVsYWNlIiwiYWN0aXZlIjp0cnVlLCJ0YWdzIjpbIm1hdGgiLCJjb2RlIl0sImFkZHJlc3MiOnsiY2l0eSI6IkxvbmRvbiJ9fQ==Output
{
"name": "Ada Lovelace",
"active": true,
"tags": [
"math",
"code"
],
"address": {
"city": "London"
}
}This is the input that the Load sample button fills in.
URL-safe alphabet and missing padding
Input
eyJuYW1lIjoiWm_DqyJ9Output
{
"name": "Zoë"
}This is base64url as found in a JWT segment: it uses _ instead of / and has no = padding. It decodes to JSON and is indented.
Each output was produced by running this tool on the input above it.
How it works
Whitespace is removed and URL-safe characters (- and _) are converted to the standard alphabet, so both Base64 and base64url input work. The bytes are decoded as UTF-8 and then parsed and indented, so you can tell immediately whether the payload is intact.
Details and limits
- There is no fixed size limit: everything runs on your device, so very large inputs depend on its memory.
- It works in current browsers on phones, tablets and computers, and it is free with no account needed.
- Encoding and decoding are exact, so the data comes back without losing anything.
- A JSON Web Token has three parts separated by dots. Paste the first or the second part on its own; the third is a signature and is not JSON.
- Line breaks and spaces inside the Base64 text are ignored, so a value wrapped at 76 columns can be pasted as it is.
- If the bytes decode but are not JSON, the error starts with "Decoded text is not valid JSON".
Common errors
| Message or symptom | What it means |
|---|---|
| This is not valid Base64 | The text contains characters outside the Base64 alphabet, or part of the string is missing. |
| The output looks like random characters | The data was binary (for example an image or compressed file), not text. |
| Decoded text is not valid JSON/XML/YAML | The Base64 decoded correctly but the content is not in the expected format. |
Questions
Can I decode a JWT with this?
You can decode its header or payload: paste one dot-separated part at a time. The tool does not verify the signature.