[JSONZen]

Semantic Diff

Paste two JSON documents and get a structural diff — added, removed, modified, by JSON Pointer path. Whitespace and key order don't count.

JSON Semantic Diff

Diff
3 changes
Left (before)
Loading editor…
Right (after)
Loading editor…
3 changes
  • modified/version
    "1.0.0-beta.1"+ "0.2.0"
  • added/tools/3
    + "diff"
  • added/privacy/uploads
    + false

Why semantic, not textual?

Two JSON documents can look very different and mean exactly the same thing — different key order, different indent, trailing newlines. A text diff fires noise on every re-format. A semantic diff parses both sides and walks the resulting trees, so the only changes you see are changes that matter.

How the path syntax works

Each change has a path in JSON Pointer form (RFC 6901). The root is /. Array indices look like /tools/2. Keys with slashes get escaped as ~1; literal tildes become ~0.

Frequently asked questions.

How is this different from a text diff?
A text diff cares about lines and characters. A semantic diff cares about JSON structure: it ignores whitespace, key ordering, and indentation. Two documents that look very different textually can be reported as identical here, and vice versa.
How are paths reported?
As JSON Pointer (RFC 6901) — slash-delimited, with array indices as numbers. So /tools/2 is the third tool, and /a~1b is a key literally named "a/b".
Are array elements matched by position?
Yes. A re-ordered array shows up as a series of modifications at each affected index.
Does it diff types as well as values?
Yes. {"a": 1} vs {"a": "1"} reports a modification at /a — number to string is a real change.
Does my JSON leave my browser?
No. Both inputs are diffed in JavaScript, in your browser. There is no server.

More JSON tools.

    JSON Diff — Free, Client-Side Semantic Diff | JSONZen