About JSON Formatter & Validator
The JSON formatter validates your JSON and re-indents it so it is easy to read, or minifies it to the smallest valid form. When the input is invalid, it points to the exact line and column and explains what was expected.
How to use JSON Formatter & Validator
- Paste JSON into the input panel, open a .json file, or load the sample.
- Choose an indentation style and whether to sort object keys.
- Select Format (Ctrl/⌘ + Enter) or Minify.
- Copy the result or download it as a .json file.
Examples
Debug an API response
Paste a minified response to read its structure, then sort keys to compare it with another response.
Find a syntax error
A trailing comma such as {"a": 1,} is reported with its line and column.
Limitations
- Strict JSON only: comments, trailing commas, single quotes, and unquoted keys are reported as errors.
- Numbers larger than 2^53 lose precision when reformatted, as in JavaScript's JSON.parse.
- Duplicate keys are collapsed to the last value, matching standard JSON parsers.
Privacy
This tool processes everything locally in your browser tab. Your input is not uploaded to Utilhex or any third party, and it is discarded when you close or reload the page. Read the privacy policy for details.
Frequently asked questions
Is my input sent anywhere?
No. Processing happens in your browser. Utilhex does not send tool input to its servers, analytics, or any AI service.
Why does my JSON with comments fail?
Comments are not part of the JSON standard (RFC 8259). Remove them, or keep the file in a format such as JSON5 that explicitly allows them.
What does sort keys do?
It orders the keys of every object alphabetically, recursively. Array order is never changed.