CraftTools

JSON Diff

Guide: How to Fix the Most Common JSON Errors

2 added · 1 removed · 1 changed

  • Changed$.version"1.0" → "1.1"
  • Added$.tags[2]"tool"
  • Removed$.owner.country"US"
  • Added$.license"MIT"

Nothing you enter or choose here leaves your device. This tool runs in your browser.

How to use

  1. 1Paste the original JSON on the left and the changed JSON on the right.
  2. 2Tick "Ignore the order of items in lists" if order doesn't matter.
  3. 3Read the list of added, removed and changed values.
  4. 4Use Swap to compare the other way round.

Frequently asked questions

How is this different from a text diff?

It compares the data, not the text. Reformatting, different indentation and a different key order aren't reported as changes, and each difference is shown with its JSONPath.

How are lists compared?

By position by default, so moving an item shows as changes. Turn on "Ignore the order of items in lists" to match equal items wherever they sit.

What do the paths look like?

$.owner.team means the team key inside owner, and $.tags[2] is the third item in tags. Keys with special characters are written like $["a-b"].

Is my JSON uploaded?

No. Both documents are compared in your browser.

Read the guide

Learn how this works and how to get the most from it.

Developer

How to Fix the Most Common JSON Errors

Trailing commas, single quotes, unquoted keys and more. Learn to read a JSON error message and fix invalid JSON quickly.

1 min read

Text Diff Checker

Compare two texts side by side and see exactly what changed.

JSON Formatter & Validator

Prettify, minify and validate JSON, with error line numbers.

JSONPath Tester

Test JSONPath queries against your JSON and see every match.

JSON Schema Generator

Generate a JSON Schema from a sample JSON document.