JSON & Data

JSON Diff

Find meaningful changes between two JSON documents without whitespace differences obscuring the result.

Differences
Your result will appear here.
Processed locally in this browser. Your input is not sent to DevKitly.

What is JSON Diff?

JSON Diff formats both documents with the same indentation and then compares them line by line, so whitespace differences disappear. Lines starting with - exist only in the first document; lines starting with + exist only in the second. Key order and array order are preserved, so those ordering changes also appear in the diff.

How to use JSON Diff

  1. Paste your input into the editor above, or select Sample to load an example.
  2. Select Compare JSON. If the input cannot be processed, a message explains what to fix.
  3. Use Copy or Download to take the result with you, and Clear to start again.

Example

Input

{"plan":"free","seats":1}
---
{"plan":"pro","seats":1}

Output

  {
-   "plan": "free",
+   "plan": "pro",
    "seats": 1
  }

Practical use cases

  • Review configuration changes
  • Compare API responses
  • Debug changed fixtures

Common problems

  • Comparing invalid JSON
  • Expecting array order to be ignored
  • Leaving out the --- separator

Frequently asked questions

Does key order matter?

Yes. The comparison is line-based, so the same keys in a different order show as changes. Keep both documents in the same order for the cleanest diff.

Can I compare JSON files or JSON Schemas?

Paste the contents of two JSON files separated by a line containing ---. The tool does not open files or compare JSON Schemas; it compares the parsed documents line by line after formatting.

How are nested values and arrays compared?

Nested values are included in the formatted line diff. Missing keys and changed value types appear as removed or added lines. Array order is preserved, so reordering array items appears as a change.

Is JSON Diff free to use?

Yes. JSON Diff is free and does not require an account.

Does my input leave the browser?

No. This tool performs its processing locally in your browser and does not need to upload your input.