Skip to content

JSON Compare

Compare two JSON documents side by side and highlight the lines that differ.

JSON Compare

Line-by-line comparison of both inputs pretty-printed with 2-space indentation, so key order matters.

What JSON Compare does

When two environments return different results for the same request, the difference is usually one field out of hundreds. Reading both payloads by eye does not find it reliably.

This tool pretty-prints both documents with the same formatting and then compares them line by line, so formatting differences disappear and only real content differences remain highlighted.

  • Normalise both sides with identical indentation before comparing
  • Highlight added, removed and changed lines
  • Filter the view down to missing properties or changed values

How to use JSON Compare

  1. 1

    Paste the original document

    Put the version you are treating as the baseline on the left.

  2. 2

    Paste the document to compare

    Put the new or unexpected version on the right. Both are re-indented automatically so whitespace is never reported as a difference.

  3. 3

    Read the highlighted rows

    Differing lines are marked. The counters summarise how many properties are missing and how many values disagree.

  4. 4

    Narrow the view

    Use the filters to show only missing properties or only changed values when a large document has many differences.

When to use it

Comparing staging with production

Run the same request against both environments and compare the responses to find the field that differs.

Reviewing a configuration change

Check what actually changed between two versions of a settings file before applying it.

Debugging a failing test fixture

Compare the expected fixture with the value the code produced to see precisely which key is wrong.

Limits and known behaviour

  • This is a textual comparison of pretty-printed JSON, not a semantic one. Two documents with identical data but different key order are reported as different.
  • Array elements are compared in order. Inserting an item at the start shifts everything after it and shows as a long run of differences.
  • Both documents must be valid JSON. Malformed input is compared as raw text, which produces noisy results.
  • There is no download of the comparison; results are on screen only.
  • Very large documents slow the browser down, because the entire diff is rendered into the page.

Privacy and data handling

Runs entirely in your browser

  • Your input is processed by JavaScript running in this page. The tool sends no request anywhere, so nothing you paste is transmitted or logged by this site.
  • Nothing is saved between visits. Closing or reloading the tab discards whatever is in the fields.

Site-wide data handling, including analytics and advertising, is described in the privacy policy.

Frequently asked questions

Why are two documents with the same data reported as different?

Because the comparison works on lines. If the keys appear in a different order, the lines appear in a different order, and the diff reflects that. Ordering is not significant in JSON, but it is significant to a line-based comparison.

Can it compare two files rather than pasted text?

No. Both sides are pasted into the editors; there is no file upload.

Does it show which value changed within a line?

It marks the line as changed rather than highlighting the individual characters inside it.