HomeBlog › How to Compare JSON Files Online

How to Compare JSON Files Online

Published · updated  ·  5 min read

JSON appears in API responses, configuration files, package manifests, test fixtures, and data exports. A useful comparison should first tell you whether each document is valid, then make formatting noise small enough that the real changes are easy to inspect.

Common JSON Comparison Tasks

Format, Validate, Then Compare

  1. Open the JSON Diff Checker.
  2. Paste the original and changed documents, or use the local file buttons above the editors.
  3. Select Format & validate on each side. Invalid JSON stays in the editor and the browser reports the parse error instead of producing a misleading diff.
  4. Select Find Differences. The structural view reports added, removed, modified, and type-changed values by JSON Pointer path.
  5. Filter or search changed paths, inspect before-and-after values, and copy or download the JSON Patch. Switch to Raw text when whitespace or source order matters.

Formatting parses each value and serialises it with consistent indentation. That can remove whitespace noise before raw-text review, while the default structural result compares parsed values and types directly.

Textual Diff Versus Structural Diff

DiffPeek opens a structural comparison first. Object properties are matched by name, so whitespace and object key order do not create structural changes. Arrays are ordered and compared by numeric index; inserting an item near the beginning can therefore produce several changed paths.

The optional raw-text view shows what the documents literally contain, including formatting and key-order changes. DiffPeek validates JSON syntax, but it does not perform JSON Schema validation, numeric tolerances, ignored-path rules, or identity-based array matching.

Important JSON Edge Cases

What Leaves the Browser?

The JSON text and rendered diff are processed locally and are not uploaded to DiffPeek. Optional aggregate analytics remain off until you allow them and never include the pasted value, a filename, a path, or an individual diff line.

Compare JSON Now

Format, validate, and inspect JSON locally with no account required.

Open JSON Diff Checker