How to use the JSON Formatter & Validator
- Paste JSON into the input box.
- Pick indentation and whether to sort keys.
- Switch between formatted and minified output, then copy.
How it works
Your input is parsed with the browser's native JSON.parse (strict RFC 8259 JSON) and re-serialised with JSON.stringify. If parsing fails, the error position is converted into a line and column. Runs entirely in your browser. Nothing you paste is uploaded or stored.
Worked examples
Find the bug
Input {"a": 1,} fails because trailing commas aren't allowed in JSON; the error points at the closing brace.
Limitations and assumptions
- Comments, single quotes and trailing commas (JSON5 / JSONC) are rejected because they aren't valid JSON.
- Very large numbers beyond 2^53 lose precision when re-serialised.
Frequently asked questions
Is my data safe?
Runs entirely in your browser. Nothing you paste is uploaded or stored.
Built and reviewed by Guru G
Calculation logic is covered by automated tests against known values. Last reviewed Nov 6, 2026. Found a problem? Let us know — see our editorial policy.