Start with the question you need to answer
You have two API responses and a failing test. One response is neatly indented; the other is a single line with its keys in a different order. A text comparison may flag almost everything, even when just one setting changed.
A structural JSON comparison helps you ask a more useful question: which values, fields, or types changed? Keep the older document as the original and the newer document as the updated version so additions and removals have a clear direction.
Separate formatting from data changes
The objects {"a":1,"b":2} and {"b":2,"a":1} carry the same members. RFC 8259 describes an object as an unordered collection, so ToolFina matches properties by name. Spaces and line breaks outside strings do not create differences either.
Types still matter. The string "false" is different from the boolean false, and null is different from an absent property. Whitespace inside a string is part of its value: "ready" and "ready " differ by a trailing space.
Read a small diff before a large one
Compare {"timeout":30,"debug":true} with {"timeout":45,"debug":"true","retries":3}. You should find three entries: /timeout changes value, /debug changes type, and /retries is added. Reordering those properties should leave the same findings.
The paths follow JSON Pointer, defined in RFC 6901. /items/0/name means the name property of the first array element. A slash inside a property name becomes ~1, and a tilde becomes ~0. A change to the entire document has an empty path, which the interface labels as the root.
Decide whether array positions carry meaning
The arrays ["draft","published"] and ["published","draft"] differ when position matters. That is the default rule. Adding an element at the front shifts later indices, which can produce several entries without implying that every record was edited.
For a list of tags or permissions, you may prefer Ignore array order. It matches complete values recursively and keeps duplicate counts, so [1,1,2] still differs from [1,2]. It does not pair objects by an id field. An edited object in this mode appears once as removed and once as added.
Keep numeric IDs and invalid input in view
Large integer IDs can be rounded by ordinary JavaScript number conversion. This diff keeps number tokens and compares their exact decimal values, so 9007199254740992 and 9007199254740993 remain different. Equivalent forms such as 1, 1.0, and 1e0 compare equal, as do zero and negative zero.
Fix syntax errors before interpreting a report. Comments and trailing commas are not accepted JSON here. Duplicate property names are rejected because different parsers may choose different values. Use the linked validator when a payload needs repair, then bring the corrected documents back for comparison.
Review and keep a useful report
Open JSON Compare, paste both documents or load local UTF-8 files, choose the array rule, and run the comparison. Expand the workspace for longer documents. Select any difference to jump to its values in the inputs, or use the change-type filter and path search to focus on particular fields.
Copy and download include all recorded changes, regardless of the current filter. Values are stored as JSON source strings to retain their digits and spelling; the report is not a JSON Patch. A shortened on-screen value is complete in the export, but an incomplete-report warning means further changes were not recorded.
- Confirm which document is original before reading additions and removals.
- Keep array order when your API uses positions as part of its contract.
- Review removed fields and type changes before updating an API client.
- Check the completeness warning and inspect report values before sharing.
Browser limits and privacy
Processing happens in the current browser tab, with no upload or input storage. Each document can contain up to 200,000 characters, 20,000 values, and 100 levels of nesting. Local files must be UTF-8 and no larger than 800 KB. Comparison records at most 1,000 differences, and displays every recorded difference below the inputs without an inner scrollbar. A report size limit also applies to long paths or values.
Editing a document, swapping sides, or changing the array rule clears the previous result so it cannot be mistaken for a fresh comparison. Reports leave the tab when you copy or download them and may contain private values. Treat a saved report with the same care as its source data.
References
- RFC 8259: The JSON data interchange format
IETF / RFC Editor
Defines JSON types, unordered object members, ordered arrays, and interoperability concerns around duplicate names and numeric precision.
- RFC 6901: JSON Pointer
IETF / RFC Editor
Specifies how pointers identify a JSON value, including empty root paths and escaping slashes and tildes in names.
Try this tool
Compare two JSON documents by value, find added or removed fields, and review changes side by side without uploading your data.
JSON Compare (JSON Diff)Related tools
JSON Formatter
Format and pretty-print JSON directly in your browser.
JSON Validator
Validate JSON, locate syntax issues, and apply individual or bulk safe fixes in your browser.
Text Compare
Compare two texts with a lightweight line-by-line diff.
JSON to C#, Python & Dart Class Generator
Turn a JSON object or array into typed C#, Python, or Dart models with nested classes, nullability, JSON mappings, and separate-file exports.