Compare two JSON documents and review every added, removed or changed value with its path. Key order and formatting are ignored.
Paste or open two JSON documents, then choose Compare JSON.
No differences. Both documents contain the same JSON.
This JSON compare tool takes an original and a changed JSON document and shows every difference between them side by side: values that were added, values that were removed, and values that changed, each with its JSON Pointer path and the exact before and after text. It is a structural JSON diff, not a text diff, so reformatting, reordering object keys or writing a number differently does not count as a change. Everything runs locally in your browser.
Paste the first document into Original JSON and the second into Changed JSON, or use Open file to load a local .json file into either side. Choose Compare JSON. Both documents are formatted and lined up side by side: added lines are green, removed lines red and changed values amber, with a gap wherever the other document has nothing. The summary counts the additions, removals and changes; use the previous and next buttons to step through them, each with its JSON Pointer path, keep editing either side, and use Copy differences to copy a plain-text report. If a document is invalid, the error names the side and the line and column.
Whitespace and the order of object members are ignored. Array order matters: elements are compared by position, so inserting an element near the start of an array reports every later element as changed. Numbers are compared by their exact value without rounding, so 1, 1.0 and 1e0 are equal and integers beyond 53 bits keep every digit. Strings and keys are compared after decoding escapes. A missing member is different from null, and a value whose type changes, for example from a string to a number, is reported as a type change. Documents with duplicate object keys cannot be compared because the result would be ambiguous.
Check what changed between two API responses, two versions of a configuration file such as package.json or tsconfig.json, an exported record and its updated copy, or a localization file and its translation. Confirm that a refactor produced identical output, review a data migration, or compare fixtures in tests. Because the comparison is structural, minified and pretty-printed copies of the same data compare as equal.
No. Object members are matched by key regardless of their order, and whitespace outside strings is ignored. Two documents that differ only in indentation, line breaks or member order compare as equal. Whitespace inside string values is part of the value and is compared.
Array elements are compared by index. Extra elements at the end of one array are reported as added or removed. Inserting or deleting an element earlier in an array shifts the following elements, so each of them is reported as changed. The tool does not try to guess which elements moved.
Yes. Numbers are compared from their written form rather than a floating-point conversion. 9007199254740993 and 9007199254740992 are different, while 1, 1.0, 1e0 and 10e-1 are the same value. Negative zero equals zero.
Yes. Parsing and comparison run locally in your browser. JSON you paste or open is not uploaded, included in analytics events or saved by this tool. Opening Phoenix Code does not transfer either document; you open your files there yourself.
Last updated:
A modern code editor with live preview, built for web developers and designers.
Try Phoenix Code Free