A quick guide to formatting and validating JSON
JSON that comes back from an API response, a log file, or a config export is almost always minified — one long line with no spacing, which is efficient for machines but painful for a human to read or debug.
Tool King's JSON Formatter takes that minified (or just messy) JSON and re-indents it with your choice of spacing, so nested objects and arrays are easy to scan visually. There's also a Minify button for the opposite direction — useful when you need to paste JSON into a config file or a single-line environment variable.
If you're not sure whether a piece of JSON is even valid — a common problem after manually editing a config file — the companion JSON Validator tool checks the syntax and tells you exactly which line and column the problem is on, rather than just saying 'invalid'. The most common culprits are trailing commas, missing quotes around keys, and using single quotes instead of double quotes, none of which are valid in strict JSON.
Both tools run entirely in your browser — nothing you paste in is sent anywhere, which matters if the JSON you're debugging contains real data from a production system.
试用此工具
JSON Formatter