FREE TOOL · NOTHING IS SENT
JSON formatter and validator
Indentation, minification, validation with the exact error, and structure statistics — key count, depth, size.
JSON formatter and validator
Depth matters more than size
A fifty-kilobyte JSON two levels deep reads effortlessly. The same volume at eight levels of nesting becomes unworkable, and that is almost always a sign of a data model worth revisiting rather than a formatting problem.
That is why the tool shows maximum depth beside the key count. Past five or six levels, the question is not “how do I indent this better” but “why is this structure so deep”.
The errors JSON.parse reports poorly
The three most common causes are invisible to the eye: a trailing comma after the last element, tolerated by JavaScript but forbidden in JSON; curly quotes introduced by a word processor; and single quotes instead of double.
The error message shown is your browser engine's own, with the offending character position. It is more precise than most online validators, which rewrite the message and lose the location.
Nothing leaves your browser
Formatting and validation use your browser's native JSON engine. No network request, no storage. You can paste an API response containing customer data without it passing through a third-party server.
That precaution makes sense: many online formatters send content to their server, and a production API response rarely contains public data.
Common questions
Why is my valid JSON rejected?
Almost always a trailing comma, curly quotes from a word processor, or single quotes. JSON accepts only straight double quotes and forbids a comma after the last element.
Does the tool accept comments?
No, because the JSON specification does not. If your file has them, it is JSON5 or JSONC — strip them before validating.
Is there a size limit?
No imposed limit. A file of several megabytes may slow the display, since processing reruns on every keystroke.
Is my data sent anywhere?
No. Everything happens in your browser, with no network request.
Valid JSON is not correct markup.
Perfectly formed JSON-LD can still declare a type that does not match the page, or information invisible to the visitor — two grounds for a manual action from Google.