Online developer tool
JSON Formatter & Validator
Paste JSON to check it's valid, pretty-print it with your preferred indent, or minify it. Invalid JSON is pinpointed by line and column.
JSON input
How to use this formatter
Purpose
Use this tool to check whether a JSON payload or config is valid, reformat it with consistent indentation, sort keys, or minify it for transport, without leaving your browser.
Main steps
- 1Paste or type JSON into the left panel.
- 2The right panel updates automatically, showing the formatted result or an error with the exact line and column.
- 3Choose an indent size (2, 4, or tab), toggle Sort keys to alphabetize object keys at every level, or toggle Minify to collapse the output to one line.
- 4Check the stats line for character count, line count, and total key count.
- 5Copy the formatted output once it looks right.
Client-side only · nothing is uploaded
Formatted output
Enter JSON to see the formatted result.