JSON Compare
Compare two JSON documents and detect added, removed and changed fields within seconds.
All comparison operations are performed in your browser. Your JSON data is not sent to a server.
Enter the JSON data to compare
Paste the original and current JSON data into the respective fields.
Original JSON
Current JSON
JSON comparison result
Not compared| Status | JSON path | Original value | Current value |
|---|---|---|---|
| The comparison result will be displayed here. | |||
JSON Compare features
The comparison features needed to examine structural and content differences between JSON documents are offered on a single page.
Finding added fields
Detects object fields and array elements that were added to the current JSON data afterwards.
Finding removed fields
Shows separately the fields that exist in the original JSON but not in the current data.
Showing changed values
Compares fields at the same JSON path whose value or data type has changed.
Comparison independent of object order
Keys in JSON objects being written in a different order is not treated as a difference by itself.
Array comparison
Compares JSON arrays by index order and reports the array elements that have changed.
Secure processing in the browser
The JSON data you enter is processed on your device and is not sent to any server.
What is JSON Compare?
JSON Compare is an online developer tool that detects differences between two JSON documents by comparing their structure and values. In the comparison result, added, removed or changed fields are shown together with their JSON paths.
REST API responses, configuration files, integration outputs, test data and microservice messages can change over time. Comparing large and nested JSON data manually takes time and can cause small changes to be overlooked.
The JSON comparison tool parses both documents and compares objects, arrays and basic data types. This way you can more easily see in which field the change occurred and what the previous and new values are.
How do you use JSON Compare?
Follow the steps below to find the differences between two JSON documents.
Add the original JSON
Paste the old or base version of the comparison into the left field.
Add the current JSON
Paste the new JSON data to be compared into the right field.
Compare
Start the process by clicking the Compare JSON Data button.
Review the differences
Review the added, removed and changed fields in the result table.
JSON comparison example
The first JSON data below shows the original record in the system.
Original JSON
{
"name": "Tekno Danışman",
"active": true,
"serviceCount": 3
}
Current JSON
{
"name": "Tekno Danışman",
"active": false,
"serviceCount": 4,
"category": "Yazılım"
}
In this example, the values of the active and serviceCount fields have been changed. In addition, the category field has been added to the current JSON data.
How are JSON documents compared?
The tool splits the JSON structure into field paths and compares each value at its own position.
| Status | Description | Example |
|---|---|---|
| Added | The field exists only in the current JSON data. |
$.category
|
| Removed | The field exists in the original JSON but not in the current JSON. |
$.oldField
|
| Changed | The field exists in both JSON documents but their values differ. |
$.active
|
| Type changed | The type of the field (string, number, boolean, object or array) has changed. |
$.serviceCount
|
Where is JSON Compare used?
JSON comparison tools are used to examine data changes in development, testing, integration and debugging processes.
Comparing API responses
Detect field and value changes between the old and new responses of an API service.
Regression tests
Check whether there are unexpected changes in the API output after a software update.
Configuration files
Find missing or changed settings by comparing the JSON configurations of different environments.
Integration checks
Check whether the data outputs of source and target systems keep the same structure.
Webhook data
Compare the field changes in webhook payload data received on different dates.
Debugging
Find the source of the error faster by comparing the expected JSON output with the actual output.
Frequently Asked Questions About JSON Compare
Review the answers to frequently asked questions about JSON comparison, array ordering, object fields and data security.
What is JSON Compare used for?
Are JSON documents compared by key order?
Does the order of JSON arrays matter?
Can nested JSON objects be compared?
$.user.address.city.Can invalid JSON be compared?
Does JSON Compare detect data type changes?
10 of type number and "10" of type string are not considered equal.Is my JSON data sent to a server?
What is the difference between JSON Compare and Text Diff?
Do whitespace characters in JSON objects create a difference?
Is JSON Compare free?
Free Developer Tools
Free tools for software development, API integration, data conversion, testing and productivity.