UtilDojo

Popular

Menu

JSON Diff — Compare Two JSON Files Online

  • This tool runs entirely in your browser. Nothing you enter or upload is sent to a server.
A plain name matches at any depth; $.a.b[*].c is an exact path. Key order and array order never count.

Original

Changed

Waiting for two JSON documents

About this tool

Paste two JSON documents and see what changed as a familiar GitHub-style diff: line numbers, red removed lines, green added lines, and unchanged sections collapsed so you only read the differences. Switch between a unified view and a side-by-side split view, or expand everything with Show all lines.

Position never matters. Object keys are compared in sorted order, and array items are matched by what they are, not where they sit — by identical value, by a shared id (id, _id, uuid and similar) or by best similarity — so a reordered list shows no changes and an edited item shows only the lines that changed. Add fields to ignore, such as updatedAt or $.meta.requestId, to hide values that always differ.

Two other views are one click away: a list of changed paths such as $.items[0].qty with before and after values, and an RFC 6902 JSON Patch you can send to a PATCH endpoint or apply with any JSON Patch library. Everything runs in your browser, so API responses and customer data are never uploaded.

Frequently asked questions

How is this different from a text diff?

A text diff compares lines, so reordered keys, reordered array items or different indentation all look like changes. This tool parses both documents and compares the data, so only real differences are shown — in the same red and green layout you know from GitHub.

Does the order of array items matter?

No. Items are paired by identical value, by a shared id property, or by how similar they are, so [1, 2] and [2, 1] are the same and a reordered list of objects shows only the fields that actually changed.

How do I ignore fields like updatedAt?

List them in the Ignore fields box, separated by commas. A plain name matches that key at any depth; a path starting with $ such as $.items[*].updatedAt matches exactly that location.

What is the JSON Patch output?

A list of add, remove and replace operations (RFC 6902) that turns the left document into the right one. Because order is ignored, the patch edits array items but does not reorder them.

Read the guide

Related tools