Utility
JSON Formatter & Validator
Pretty-print, minify and validate JSON with exact line and column errors. Numbers and strings are never altered. Nothing leaves your browser.
Options
Indentation
Formatted
Paste JSON above — it's checked and formatted as you type.
How it works
- 1
Paste your JSON — it is checked and formatted as you type.
- 2
Choose Format or Minify, the indentation, and whether to sort keys A → Z.
- 3
Copy or download the result. If the JSON is invalid you get the exact line, column and a pointer to the problem.
JSON Formatter & Validator — frequently asked questions
- Will it change my numbers or text?
- No. Numbers and strings are kept exactly as you wrote them — large integers like 12345678901234567890, 1.0, 1E2 and escapes like \u00e9 stay untouched, which a typical parse-and-reprint formatter would silently alter. Key order and duplicate keys are kept too (unless you sort).
- Does it accept comments, trailing commas or single quotes?
- No — it validates strict JSON, as parsers and APIs expect. Those are flagged with the exact position and what to change, such as 'a trailing comma isn't allowed' or 'strings must use double quotes'.
- What does Sort keys do?
- It orders every object's keys alphabetically, including nested ones, which makes two JSON files easy to compare. Arrays keep their order.
- Is my JSON uploaded?
- No. It is parsed and formatted in your browser, so API responses, config files and tokens never leave your device.
- Is there a size limit?
- There is no fixed limit, but very large files (tens of MB) depend on your device's memory. Nesting deeper than 400 levels is rejected.
