JSON WORKSPACE
JSON Compare
Compare JSON structure.
Input is processed on this site only when you run the tool. The application does not save inputs or results.
input.json
changed.json
Result result.json
A little clarity goes here.
Run the tool to see your result.
Result preview
UTF-8 text, at most 65536 bytes per input. Tab leaves the editor. Plain text disables syntax colors. Browser textareas may normalize line endings to LF.
{"compare":{"inputMode":"pair","options":{"objectOrder":{"type":"enum","values":["ignore","preserve"],"default":"ignore"},"numbers":{"type":"enum","values":["lexical","value"],"default":"lexical"}}}}{"compare":{"input":"{\"version\":1}","input2":"{\"version\":2}","options":{"objectOrder":"ignore","numbers":"lexical"},"output":"{\"differences\":[{\"path\":\"\/version\",\"change\":\"replaced\",\"before\":1,\"after\":2}],\"equal\":false}"}}A QUICK WALKTHROUGH
A familiar workflow,
with room to focus.
Place the original and changed JSON in their labeled editors.
Choose whether object order matters and whether numbers compare by spelling or exact value.
Compare and inspect JSON Pointer paths, change kinds and the equality result.
When to use JSON Compare
Compare two JSON responses when the important question is which values or object members changed, rather than which text lines moved.
Read the result
Read JSON Pointer paths and change kinds. Array positions remain significant; choose deliberately whether object order and numeric spelling should matter.
SEE IT IN PRACTICE
Worked examples
Sample input. A result you can inspect.
Compare example
Original
{"version":1}Changed
{"version":2}- Object order
- Ignore order
- Number comparison
- Exact spelling: 1 ≠ 1.0
Expected result
{"differences":[{"path":"/version","change":"replaced","before":1,"after":2}],"equal":false}{"kind":"compare","title":"1 structural change","rows":[{"path":"\/version","change":"replaced","before":"1","after":"2"}],"total":1,"note":"Paths use JSON Pointer notation. Arrays are compared by index. Added, removed and changed values are labeled as well as colored.","schema":1}Formats, limits and common errors
Make every object key unique. Reduce very large or deeply nested comparisons. A size/work failure returns no partial difference list.
- Arrays compare by position; this is not a minimal edit script. String escapes compare by decoded Unicode without normalization.
- Lexical numbers distinguish 1, 1.0 and 1e0; value mode normalizes decimal strings without floats or exponent expansion.
- Duplicate keys are rejected. Preserve-order mode also reports changes to object key sequences.
- Each input is limited to 64 KiB, 64 levels and 10,000 values. At most 1,000 differences; excessive results fail without truncation.
- Number tokens are at most 4,096 bytes and normalized exponents at most ±100,000.
- Input: 65,536 UTF-8 bytes per text field. Output: at most 524,288 UTF-8 bytes; serialized responses have a separate 1 MiB ceiling. Size/work failures return no partial result.