How do I find the syntax error in my JSON?
Paste it into the validator — it reports the exact line and column where parsing failed. The three most common causes are a trailing comma after the last item in an object or array, strings wrapped in single quotes instead of double quotes, and // or /* */ comments. Standard JSON (RFC 8259) allows none of these, which is why copying a JavaScript object literal straight into a .json file usually breaks.
What is the difference between JSON, JSONC and JSON5?
Standard JSON follows RFC 8259: keys must be double-quoted, and comments and trailing commas are forbidden. JSONC adds comments — it is what VS Code uses for its settings files. JSON5 is looser still, allowing single quotes, unquoted keys, hexadecimal numbers and multi-line strings. The validator here checks against standard JSON, so strip comments out of a JSONC file before validating it.
Is it safe to paste sensitive JSON into an online formatter?
With these tools, yes — formatting, minifying, validating, diffing, sorting, flattening and format conversion all run in your browser via JavaScript, and the data never leaves your device. The only exception is anything explicitly labelled “AI analysis”, which sends content to a server; that is marked on the page and is entirely optional.
How do I compare two JSON files?
Use the diff tool and paste one payload on each side. It aligns them structurally and marks additions, removals and changes field by field. This is not a plain text diff — a different key order is not reported as a difference, which matters a lot when comparing API responses, because most servers make no guarantee about key ordering. If you do want a consistent order, run both through the key sorter first.
How are nested objects handled when converting JSON to CSV?
CSV is a flat two-dimensional format and cannot express nesting directly, so the converter flattens the structure first and joins the path with dots — user.address.city. Arrays expand by index into items.0.name, items.1.name and so on. If your data is deeply nested, run it through the flatten tool first to preview the generated column names before exporting.
What can JSONPath do that a loop cannot?
JSONPath is a query language of its own: $ is the root, .. descends recursively, [*] iterates an array, and filters like [?(@.price > 100)] select by predicate. A single expression can pull values out of deep nesting in bulk without writing traversal code. For example $..book[?(@.price<10)].title returns the titles of every book under 10.