Slicelytics monogram

Compare JSON and CSV Files

Compare files in different formats: a JSON API response with a CSV export, NDJSON with TSV, or any other pair. Both are read as records first, so the diff shows changed values, not format differences. Nothing is uploaded.

  • Nothing is uploaded
  • Free, no sign-up
  • Large and compressed files
id
email
plan
seats
active
signed_up
5 items
5 items

Here you will see the semantic difference between your datasets.
Use the filtering options above to easily understand and compare your data.

The demo compares customer accounts as an API returns them, in JSON, with the billing system's CSV export of the same accounts. Open your own two files with the buttons above, or drop each onto its side. For more room, open the full app, which opens with the files you opened here.

How to Compare Files in Different Formats

  1. Open one file with Open the First File and the other with Open the Second File. Each can be JSON, NDJSON / JSONL, CSV, TSV, TOON or FIT, compressed or not.
  2. Both are read into records: a CSV row becomes an object keyed by the header, an NDJSON line an object, a JSON array a list of them.
  3. The diff shows the records that differ, and in each, the fields whose values don't match, e.g. that account 377's plan is solo in the API and team in billing.

Why Convert-Then-Diff Falls Short

The usual route is to convert the CSV to JSON with one tool, then paste both into a JSON diff. Most converters turn every cell into a string, so 12 no longer equals "12" and every number shows as changed. Slicelytics reads CSV and TSV cells as the types they hold: numbers, including decimal commas and thousands separators, as numbers; true and false as booleans; empty cells as null. A CSV row and the matching JSON object compare equal when their values are.

What Lines Up, and What Doesn't

  • Flat records compare cleanly: field names are matched to column names, in any order.
  • Records are matched by position: the first with the first. Export both sorted by the same key.
  • Nested JSON: a column named address.city stays a column of that name; it isn't matched with a nested address object. Compare nested data with the JSON Diff instead.
  • Blank vs missing: an empty CSV cell is null, which differs from a JSON value, and from a key the JSON leaves out.

Reconcile Systems Without Uploading Data

Checking that a CRM, a billing system and an API agree means comparing customer records, which shouldn't go to a third-party converter or diff site. Both files are read and compared in your browser and never uploaded. For two files in the same format, see the CSV Diff.

Common Questions

Can I compare a JSON file with a CSV file?

Yes. Both are read as records, a CSV row as an object keyed by its header, and compared value by value. Any two of JSON, NDJSON / JSONL, CSV, TSV, TOON and FIT can be compared the same way.

Will numbers in the CSV match numbers in the JSON?

Yes. CSV cells that hold numbers are read as numbers, and true/false as booleans, so 12 in the CSV equals 12 in the JSON. A number the JSON holds as a string, e.g. "12", does not.

What if the JSON is nested and the CSV is flat?

Nested objects don’t line up with flattened columns such as address.city. Flat records compare cleanly; for nested data, compare two JSON files with the JSON Diff.

Are the files uploaded?

No. Both are read and compared in your browser, and never sent to a server.

More Free Tools

Guides