How it works
JSON.parse validates syntax and JSON.stringify formats the value with two-space, four-space or compact output. The text stays in your browser.
Development / HXD Labs
Paste a JSON document to validate it, indent it and copy the formatted result.
Fill in the fields to see the result.
Paste JSON, choose 2-space, 4-space or compact output, then validate it. When your browser reports an error position, the tool shows its line and column. Formatting keeps values but may change whitespace and the display of some numbers.
JSON.parse validates syntax and JSON.stringify formats the value with two-space, four-space or compact output. The text stays in your browser.
Paste {"ok":true,"count":2}, choose an output style and copy the formatted result. When the browser reports an error position, the tool shows its line and column.
JSON does not allow comments, trailing commas or unquoted keys. Very large numbers may lose precision in JavaScript.