JSON Formatter and Validator
Format, minify and validate JSON locally, with parse feedback that helps isolate invalid commas, quotes, keys and nesting.
Start using
What JSON Formatter and Validator does
Format, minify and validate JSON locally, with parse feedback that helps isolate invalid commas, quotes, keys and nesting.
Worked example
{"name":"Ada","roles":["admin","editor"]}
A valid, indented object with the roles array on separate lines
How the result is produced
Validation parses the input according to the JSON grammar. Formatting writes the same data with indentation; minifying removes unnecessary whitespace without changing values.
Useful workflows
- Inspect an API response or webhook payload
- Prepare a configuration file for review
- Minify a valid fixture for transport or testing
Important limits
- JSON does not allow comments, trailing commas, single-quoted strings or unquoted keys.
- Formatting does not verify that field values satisfy an external API schema.
- Large documents can consume significant browser memory.
Frequently asked questions
Why is valid JavaScript not valid JSON?
JavaScript object syntax allows constructs—such as comments or undefined—that JSON does not.
Does formatting change my data?
It should only change insignificant whitespace; always compare or test critical configuration before deployment.
Why does valid-looking JSON fail to parse?
JSON requires double-quoted keys and strings and forbids trailing commas, comments, NaN and undefined values.
Only whitespace outside strings changes. Original number spelling, string escape sequences, object-key order and repeated keys are retained; no sorting or duplicate-key removal is performed. For example, 9007199254740993 and 1.00 remain exactly as written. Input is limited to 500000 UTF-16 code units. Beautify allows up to 256 nested containers and 4000000 output code units; minify can compact deeper valid JSON. Syntax is checked in both modes, but no schema or business rule is checked. There is no file picker, download button or separate validate action.
Processing takes place locally in your browser.