JSON Formatter & Validator
Format, validate and minify JSON, with exact error lines and fix hints.
How to use JSON Formatter & Validator
- Paste JSON or open a .json file.
- It is validated as you type. If it is invalid, the exact line and column are shown with a hint.
- Choose indentation, sorting or minify, then copy or download the result.
How it works
Validation uses the browser’s own strict JSON.parse, which follows the JSON standard (RFC 8259) exactly. If parsing fails, the error position is converted to a line and column, and common mistakes are detected: trailing commas, single quotes, unquoted keys, comments and NaN.
Nothing you paste is stored or transmitted. In November 2025 security researchers found that two popular JSON formatting sites had exposed over 80,000 saved pastes, including passwords and cloud keys, through a public "recent links" feature. Toolgix has no save feature and no server copy, so there is nothing to leak.
Example
{"a": 1,} is invalid: the hint points to the trailing comma before }. Remove it and the formatter outputs { "a": 1 } with your chosen indentation.
Frequently asked questions
Is it safe to paste API responses or config with secrets?
The text never leaves your browser, and there is no save or share feature. Still, treat any secrets you have pasted into tools as you would any copy-paste: rotate them if you suspect exposure elsewhere.
Why does valid JavaScript object syntax fail?
JSON is stricter than JavaScript: keys and strings need double quotes, and comments, trailing commas, single quotes, undefined and NaN are not allowed.
Does sorting keys change my data?
No values change, only the order of keys inside objects. Array order is kept, because it is meaningful.
How large a file can I format?
Tens of megabytes work on most computers. The limit is your browser’s memory.
Are big numbers preserved?
Numbers above 2^53 (about 9 quadrillion) lose precision in JavaScript, so very large IDs stored as numbers may change. Store such IDs as strings.
Limitations
- Integers beyond ±9,007,199,254,740,991 lose precision when parsed (a JavaScript limit).
- Duplicate keys are allowed by JSON.parse; the last value wins and the earlier ones are dropped from the output.
Last reviewed November 9, 2026. How we build and test tools.