JSON Formatter & Validator

Free text and developer tool

Validate JSON, format it with readable indentation, and optionally sort object keys.

Enter text

Result

Enter values and run the tool.

How this tool works

The validator parses the input with the browser’s standards-based JSON parser. Valid data is serialized with the chosen indentation; optional sorting is applied recursively to object keys without reordering arrays.

Worked example

{"name":"InstantTools","active":true} formats into an indented object with two top-level keys.

Frequently asked questions

Does JSON allow comments?

No. Standard JSON does not support comments, trailing commas, or single-quoted strings.

Will sorting change arrays?

No. Sorting affects object keys only; array order is preserved.

Is the JSON sent anywhere?

No. Validation and formatting run locally in your browser.

Related text and developer tools