How to format and validate JSON
Clean up a JSON file, fix common syntax errors and choose when to minify it.
JSON is easiest to read when every nested level is indented consistently. Open the JSON Formatter and choose Format after pasting an object or array. The result keeps the same data and adds line breaks and indentation.
Fix common syntax errors
JSON requires double quotes around property names and string values. Remove trailing commas after the final property or array item. Check that every opening bracket has a closing bracket of the same type.
Format for people, minify for transfers
Keep formatted JSON for debugging and reviews. Choose Minify when you need compact output for a request body or another system. Validate the output again after editing or copying it.