Pretty-print and check structure.
How to use JSON Formatter
Paste your JSON. Paste or type into the JSON input box. A sample is loaded by default.
Read the verdict. If the JSON is invalid you see the line and column of the first problem along with a message.
Review the stats. For valid JSON the tool shows Keys, Max depth, Objects and Arrays.
Copy the result. Click Copy to copy the pretty-printed JSON from the Formatted box.
Limits and privacy
- Everything runs in your browser. Your JSON is not uploaded.
- Formatted output uses 2-space indentation. There is no option to change it, and no minify button on the page.
- The checker follows strict JSON: double-quoted keys and strings, no trailing commas, no comments.
- Only the first error is reported.
- Output goes through the browser's JSON parser, so duplicate keys are collapsed and very large numbers may lose precision.
- There is no stated input size limit. Very large documents are limited by your browser.
Frequently asked questions
Is my JSON sent to a server?
No. The checking and formatting happen in your browser.
How does it find the error position?
The tool walks through the text itself and tracks line and column, so it reports an exact location for the first problem it hits rather than relying on the browser's error text.
Why does it reject my trailing comma or comment?
The tool validates strict JSON, which does not allow trailing commas, single quotes or comments.
What do the stats mean?
Keys is the number of object keys in the whole document, Max depth is how deeply values are nested, and Objects and Arrays count each kind of container.