JSON formatter and validator
Paste JSON to check it is valid, then format it with indentation or compress it to one line. Processing happens in your browser; nothing is uploaded.
How it works
The tool parses the text with the browser’s built-in JSON.parse, which follows the JSON grammar: double-quoted strings, no trailing commas, no comments, and no single quotes. When parsing fails, the browser’s error message is shown, with the line and column where the browser reports them. Formatting re-serializes the parsed value with JSON.stringify, so very large integers beyond 253 lose precision and duplicate keys in an object collapse to the last one. Key sorting is optional and sorts at every level; arrays keep their order.
