PrivateCSV

Compare two JSON files

See what changed between two JSON documents, path by path.

Options

Paste or open two JSON documents. Key order never matters; the differences appear as you type.

  • Nothing is uploaded
  • Free · no account
  • Tested on 400k-row files

Reference

Compare JSON: how it works

The tool is above. Below: a short overview, optional step-by-step detail, honest browser limits, and answers to common questions.

Last updated 3 min read

About this tool

PrivateCSV compares two JSON documents by structure, not line by line: key order is ignored, and each difference is listed with its path, such as $.address.city, and both values. Added, removed, changed and type-changed values are shown in a table you can download as a CSV report. Options ignore array order, letter case, surrounding spaces or the difference between 1 and "1". Both documents stay in your browser.

How to check that your file is never uploaded

Read the step-by-step guideHow-to, example and use cases (~3 min)

How to compare two JSON files

  1. Paste the original JSON in the left box (A) and the new one in the right box (B), or open the two files.
  2. The differences appear below as you type, each with its path, its type of change and the values in A and B.
  3. Tick Ignore array order if lists may be reordered, and the other options to ignore case, spaces or number/text types.
  4. Click Download report to save the list of differences as a CSV file.

Example

Two versions of a customer record; key order differs but does not count.

a.json and b.json
A: {"id":7,"name":"Ana","tags":["vip","news"]}
B: {"name":"Ana M.","id":7,"tags":["vip"],"plan":"pro"}
differences
$.name     Changed  "Ana" → "Ana M."
$.tags[1]  Removed  "news"
$.plan     Added    "pro"

When you need it

API responses before and after a change
Check that a deployment, a migration or a library upgrade did not change a response by accident, field by field, without reading two long documents side by side.
Configuration drift
Compare the settings of two environments (staging and production, two servers, two app versions) where keys are often written in a different order.
Test fixtures and snapshots
Find why a snapshot test fails: the exact path of each changed value is easier to act on than a text diff full of moved lines.

Structural diff, not text diff

A text diff reports every line that moved, so two JSON files with the same data in a different key order look completely different. This tool parses both documents and compares values: objects by key, arrays by position, numbers by value (1.0 equals 1), strings exactly.

Each difference is one of: Added (only in B), Removed (only in A), Changed (same type, other value) or Type changed (for example the number 1 became the string "1", or an object became an array).

Arrays in any order

With Ignore array order, equal items are matched wherever they are, so ["a", "b"] equals ["b", "a"]. Objects left over on both sides are then compared field by field, which suits lists of records where one record was edited.

Browser and file limits (not a trial)

These are technical limits of running in your browser—device memory, encoding and what this tool does not do. They are not a free trial, account quota or paid plan. There is no subscription.

  • Each document can be up to 20 MB of text.
  • The table shows the first 1,000 differences; the CSV report lists all of them.
  • Arrays are compared by position unless Ignore array order is ticked; an inserted item at the start then shows as a change on every following index.

Frequently asked questions

How do I compare two JSON files online?

Paste or open the first JSON in box A and the second in box B. Every difference is listed with its path and both values; key order is ignored automatically.

Does the order of keys matter when comparing JSON?

No. In JSON, objects are unordered, so {"a":1,"b":2} and {"b":2,"a":1} are reported as identical. Array order does matter by default, because it is part of the data, but you can ignore it with an option.

Can I compare JSON while ignoring array order?

Yes. Tick Ignore array order. Equal items are matched first wherever they are; what remains is reported as added, removed, or as field changes when an object was edited.

How do I export the differences between two JSON files?

Click Download report (CSV). The file lists the path, the type of change and the values in A and B for every difference, and opens in Excel or Google Sheets.

Is my JSON uploaded when I compare it?

No. Both documents are parsed and compared by JavaScript in your browser; nothing is sent to a server.

Related tools

Go further

Your files never leave your device

PrivateCSV runs this tool in your browser. No upload, no account, no trial and nothing to install.