JSON formatter and validator
Paste your JSON to make it readable, find the exact spot where it breaks, or shrink it to a single line.
Sealed on this device
Runs in your browser. Nothing is uploaded.
Sealed
Result
Your formatted JSON will appear here as you type.
This JSON isn’t valid
How it works
-
Paste your JSON
Paste it, type it or open a .json file. Formatting starts as soon as there is something to read.
-
Fix what’s broken
If the JSON is invalid, you see the line, the column and a plain explanation. One click puts your cursor on the problem.
-
Choose the shape
Pick formatted, minified or tree view, set the indentation, sort the keys, then copy or download the result.
Frequently asked questions
Is my JSON sent to a server?
No. Parsing and formatting run entirely in your browser, so API responses, configuration files and tokens never leave your device.
Why does my JSON say it’s invalid when JavaScript accepts it?
JSON is stricter than JavaScript. Keys and text need double quotes, trailing commas and comments aren’t allowed, and values like undefined or NaN don’t exist. The error message names the rule that was broken.
Will formatting change my numbers?
No. Numbers and escaped characters are kept exactly as you wrote them, so very large integers and long decimals are not rounded the way JSON.parse would round them.
What does “Sort keys” do?
It orders the keys of every object alphabetically, at every level. Arrays keep their order, because the order of array items is part of the data.
Can it handle large files?
Yes. Files of several megabytes format in a moment. The tree view opens one level at a time and shows long lists in batches, so the page stays responsive.