Indent, minify or sort the keys of a JSON document, and when it is invalid get the line, the column and what was expected there.
The browser engine no longer says where it failed, so when JSON does not parse the page walks it again with its own analyser, which can: “a comma too many before }”, “expected a key name in double quotes”, always with the exact position.
How to use it
- Paste the JSON, however messy.
- Choose indented, minified or key-sorted output.
- Copy the result.
Frequently asked questions
- What is sorting the keys for?
- For comparing two JSON documents that hold the same content in a different order. Once both are sorted, a text diff shows only the real differences.
- Is the file uploaded anywhere?
- No. Everything happens inside the tab, which matters when the JSON you paste holds API keys or customer data.
- Does it accept JSON with comments or trailing commas?
- No, and it will tell you exactly where. That is not standard JSON, even though some configuration files allow it.
Related tools
JSON to CSVAn array of objects into a table, flattening nested objects.
CSV to JSONDetects the separator, respects quotes and types the values.
JSON to YAMLA straight conversion that keeps the key order.
YAML to JSONTakes files with several documents in them.
Decode a JWTHeader, payload and expiry. The signature is not verified.