How to use the json formatter
- Paste or type JSON on the left.
- Choose an indent size, or switch to minify mode.
- Read the status line: valid JSON reports the type and size; invalid JSON points to the failing character.
- Copy or download the formatted result.
JSON is unforgiving: one trailing comma or an unescaped quote and the whole document is invalid. Rather than hunting for the problem by eye, this formatter parses the text with the same rules the browser uses and reports the exact position of the first failure.
Everything runs locally, which matters when the payload contains API keys, customer records or access tokens. Nothing is logged or transmitted.
Common causes of invalid JSON
- Trailing commas before a closing brace or bracket.
- Single quotes instead of double quotes around keys and strings.
- Unquoted keys copied from JavaScript object literals.
- Comments — valid in JSON5 and JavaScript, not in JSON.
- Smart quotes pasted from a word processor.
Minifying strips all insignificant whitespace, which is what you want before embedding JSON in a header, in a URL parameter, or inside another JSON string.
Frequently asked questions
Is my JSON uploaded anywhere?
No. Parsing and formatting happen in your browser with the native JSON parser.
Does it validate against a schema?
It validates JSON syntax, not a schema. A document can be perfectly valid JSON and still have the wrong shape for your API.
How large a file can it handle?
Several megabytes is fine on a normal machine; beyond that, browser rendering of the formatted text becomes the bottleneck.
Can I sort the keys?
Yes — enable alphabetical key sorting to get a stable, diff-friendly ordering.