JSON toolkit

Read a payload, find out why it will not parse, compare it with another one, and take it out as TypeScript, CSV or YAML. The document stays in this tab - which matters, because the JSON you are debugging is usually a real response with real data in it.

  • Outputs8 views of one document
  • ComparisonBy path, not by line
  • Your payloadNever leaves the tab

Your JSON

Paste it, or open a .json file from your machine.

Valid JSON· 24 nodes, 4 levels deep

Size
448 B
Keys
17
distinct
Arrays
1
Depth
4
levels

Output

542 B

Why compare by path

A line diff on formatted JSON reports a reordered key as two changes and a re-indented block as a hundred. Comparing by path reports what actually differs - one line per changed value, with the path you would use to reach it in code.

About the TypeScript output

Objects inside the same array are merged rather than emitted one per shape: a key missing from some rows becomes optional, and a key whose type varies becomes a union. That is what the API really returns, and User1 / User2 / User3 would only hide it.

What CSV cannot carry

Nested objects are flattened into dotted columns, and a nested array becomes one cell of JSON - a spreadsheet has nowhere else to put it, and exploding it would silently change the row count.

Frequently asked questions

Why will my JSON not parse?
Usually a trailing comma, a single quote where a double quote belongs, an unescaped quote inside a string, or a stray newline in the middle of one. Paste the document in and the error is reported with the position it occurs at, which is faster than reading it back yourself.
Why compare JSON by path instead of by line?
A line diff on formatted JSON reports a reordered key as two changes and a re-indented block as a hundred. Comparing by path reports what actually differs - one line per changed value, with the path you would use to reach it in code.
How does it generate TypeScript interfaces?
Objects inside the same array are merged rather than emitted one per shape: a key missing from some rows becomes optional, and a key whose type varies becomes a union. That describes what the API really returns, where User1 / User2 / User3 would only hide the inconsistency.
Can JSON with nested objects be converted to CSV?
Yes, with a caveat worth knowing. Nested objects are flattened into dotted columns, and a nested array becomes a single cell holding JSON - a spreadsheet has nowhere else to put it, and exploding it would silently change the number of rows.