Free Developer Tool

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

0 Added field
0 Removed field
0 Changed field
0 Total differences

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.

1

Add the original JSON

Paste the old or base version of the comparison into the left field.

2

Add the current JSON

Paste the new JSON data to be compared into the right field.

3

Compare

Start the process by clicking the Compare JSON Data button.

4

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.

Comparison Logic

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
Because the order of fields in JSON objects does not change the meaning of the data, keys appearing in a different order are not shown as a difference. Arrays, being ordered data structures, are compared by index.

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?
JSON Compare compares two JSON documents and detects added, removed and changed fields. Each difference is shown together with its JSON path and its old and new values.
Are JSON documents compared by key order?
No. The order in which keys are written in JSON objects does not change the meaning of the data. Therefore, the same fields are not treated as a difference even if they are written in a different order.
Does the order of JSON arrays matter?
Yes. JSON arrays are ordered data structures. This tool compares arrays by index. The same elements appearing in a different order may be reported as a change.
Can nested JSON objects be compared?
Yes. The tool compares nested objects and arrays recursively. Differences are shown with JSON paths such as $.user.address.city.
Can invalid JSON be compared?
No. Both inputs must have valid JSON syntax for the comparison to be performed. If invalid data is found, an error message is shown for the relevant input.
Does JSON Compare detect data type changes?
Yes. If the value of a field looks the same but its data type has changed, this is reported. For example, 10 of type number and "10" of type string are not considered equal.
Is my JSON data sent to a server?
No. JSON parsing and comparison are performed directly in your browser. The JSON content you enter is not sent to a server for comparison purposes.
What is the difference between JSON Compare and Text Diff?
Text Diff compares texts at the line or character level. JSON Compare, on the other hand, parses the JSON data and compares fields and values structurally. Therefore it can ignore non-semantic differences such as whitespace and key order.
Do whitespace characters in JSON objects create a difference?
No. Indentation, line breaks and unnecessary whitespace do not change the meaning of the JSON data. The tool compares the parsed JSON structure, not the text appearance.
Is JSON Compare free?
Yes. You can use the Tekno Danışman JSON Compare tool for free and without registration.

Free Developer Tools

Free tools for software development, API integration, data conversion, testing and productivity.