🧰Locly

Compare Two JSON Documents

Highlight additions, removals, and changes between two JSON values

Paste two JSON documents and click Compare

About This Tool

JSON Diff compares two JSON documents and highlights added, removed, and changed values by path. You can sort object keys first for a stabler compare. Parsing and diffing are processed locally in your browser.

How to Use

  1. Paste JSON into both sides
  2. Optionally enable sort keys
  3. Click Compare
  4. Review added, removed, and changed paths
  5. Fix invalid JSON if an error appears

Common Use Cases

  • Compare API responses
  • Review config changes
  • Check CMS JSON exports
  • Verify localization files
  • Debug nested object edits

FAQ

Q1: What if JSON is invalid?

A clear error is shown for the left or right side. Fix the syntax and compare again.

Q2: Why sort keys?

Key order in objects does not change meaning. Sorting helps ignore order-only differences.

Q3: Are arrays compared by index?

Yes. Array items are compared by position.

Q4: Is JSON uploaded?

No. Comparison is processed locally in your browser.

Q5: How is this different from text diff?

JSON Diff understands structure and paths, not only raw text lines.

Related Tools