JSON Diff Online
A Tool That Compares By Meaning, Not Lines
This JSON diff online tool compares two documents and will display every value that has been added, deleted or modified. The tool supports reading JSON, XML and YAML in the same tab.
- FreePrice
- 3Formats
- NoneSign-up
- NoneUploads
JSON Diff
Compare two JSON, XML or YAML documents by meaning, not by lines
- Added
- 0
- Removed
- 0
- Changed
- 0
- Unchanged
- 0
Ready. Paste a document on each side and the differences appear.
Guides for this tool
Articles with worked examples, tables and a short video that help you get more from this tool.
Invalid JSONInvalid JSON explained: what breaks it, the common errors and fixes, and how to read a parser error.
9 minutes of reading · video guide inside
Why Use A JSON Diff Online
A typical text diff analyzes individual lines of text. This is fine for prose, but not so fine for data. When a tool saves its keys in a different order, then every line will appear to have been modified, and the actual change will be obscured by the noise.
This JSON diff on-line tool compares by "meaning." If two objects have the same keys, then they are considered to be the same object regardless of the order of those keys. So, you will only find out what is different between the two.
Older version goes in the left box, newer version in the right one. The list of changes appears at once. Each row shows a path, such as $.stock.shop, and the old and new value.
The tool also reads XML and YAML. So you can compare two config files, two API replies or two exports, even in different formats.
Developers use this for many jobs. For example, you can check a config before a release. Or you can compare an API reply before and after a deploy. Then you know what really changed. Also, a support team can compare two exports from a customer and find the one field that differs.
Added, Removed And Changed
Each difference belongs to one of three types. Added means the key exists only on side B. Removed means it exists only on side A. Changed means both sides have it, with different values.
Every type has its own colour and label, so colour is never the only clue. Four counters appear above the list. Tick or untick a group to show only the rows you want.
A value’s type has changed. For instance, the number 1 and the string "1" differ in type, and the software recognizes this difference.
The paths are similar to the JSONPath style. A dollar sign ($) represents the root. Each extra key adds a dot (.) followed by the key’s name, and each extra list item adds its index location in brackets ([]). So, you can easily get a path to use in your own application.
JSON Compare Online, Ignoring Order
Lists are different. Most often when using a list, the order is important. Sometimes but, the order is unimportant (e.g., a list of tags). Select "Ignore the order of list items" and the tool will find all matching items regardless of where they appear.

If there isn’t an equivalent item, then those items are paired based on their positions and you can see what changed within those items. Items that are not paired with anything else appear as either "added" or "removed."
Pair List Items Using A Key
A good way to make lists of records easier to manage is by creating a better rule. Consider a list of products where each product has an id. If the order of the products changes, then a position check would report chaos.

Now that you have typed id into the match field, the system will pair each item with its duplicate using the id, and then compare only those items. Any changes in prices will appear on a single line.
Products that exist on one side only show as added or removed. That is exactly what you want when you diff two exports.
Skip The Noise
Certain fields change every time you save. A timestamp. A version counter. A request id. They bury the changes that matter.

List the keys that should be ignored in the ignore these keys list (comma separated). These keys will be removed from both sides of the comparison. Also, you may choose to disregard letter case and space surrounding text, and consider 1 and 1.0 equivalent.
Export A JSON Patch
The Download JSON Patch button saves the changes as a patch in RFC 6902 format. Apply this to side A, and you will produce side B. There are many libraries that understand how to parse this format.

The position of each patch needs to be exact. This allows the button to function correctly when comparing lists based on their positions, and the tool will let you know if the list is out of position.
Big Numbers Stay Exact
All numbers are kept as is by the user. Two 20 digit identification numbers which differ only on the last digit will appear to be different. But many software applications will convert these numbers into a standard format before determining if they are the same.
Using the JSON Diff: A Short Video Guide
This brief video shows each step from start to finish. Choose your language below, and switch on captions if they help.
Using The JSON Diff Tool, Step By Step
The four-step process creates a list of changes. After that, you can adjust what is considered a modification.
Paste both sides
Place the initial version on the left side of the screen and the edited version on the right side of the screen. You may open a document to be placed on either side.
Leave the format setting on auto and let the tool work it out
The tool reads JSON, XML and YAML. If a file looks odd, set the format by hand.
Tune the comparison
Ignore list order, match items by a key, skip noisy keys, or relax case and spacing.
Read, copy or export
Go through the change list in order, working your way through each item individually. You can either copy the change list as a report or download it as a JSON Patch.
What This JSON Diff Tool Does Differently
There are many tools that can find lines in an image. This tool has extra features that go beyond simply identifying lines.
Compares meaning
Key order and indentation never count. Only real differences appear in the list.
Three formats, mixed
Compare JSON with YAML, or two XML files. Each side is read by its own reader.
Smart list matching
Position, any order or key (id) can be used to compare your data. Select the best method of output based upon what type of data you will be comparing.
A JSON Patch document you can apply without editing it
Download the changes as an RFC 6902 JSON Patch, ready for a library or a script.
Exact numbers
Long ids keep every digit, so two near-equal ids are never called equal.
Nothing leaves your tab
Config files often hold sensitive data. Your web browser handles the processing so that no data is transmitted to this website.
Habits For Comparing Data Safely
A diff can only be used if there is some connection between the two items that are being compared. These habits will make sure that your comparisons are fair.
- Validate both sides first. A broken file cannot be compared. The tool names the side and the line, so you fix it fast.
- Ignore timestamps on purpose. Add the noisy keys to the disregard list so that they will not appear again. Every row you view is then a change made by an individual.
- Pick the list rule that fits the data. Use position for ordered steps, any order for tags, and a key for records.
- Use a key that is truly unique. If there are multiple records that have the same ID, only the first record will pair. You must check your IDs before trusting the outcome.
- Mind the types. The text “5” and the number 5 aren’t the same thing. When there is a difference in type between your two sources, choose the equal-number option.
- Read removed rows twice. A removed key can either be an added field that was deleted, or it could be a field that has been renamed. When a field is renamed, you will see one removal and one addition.
- Compare after the same cleanup. Both sides must first be processed through a common format. Any differences that are apparent after that will then result from the data itself, rather than from differences in your processing tools.
- Keep the original files. The diff has left those parts of your files alone. Nevertheless, a saved copy gives you the highest level of security.
- Compare small pieces of big files. When a file is large, reduce the amount of info you need from it. This will make your list short and easy to read.
- Share the report, not the files. Paste the completed report into a ticket so your team has the chance to review what was changed. This report contains only the paths and values that were modified.
- Export a patch for repeat jobs. When you regularly use the same change, using a patch will save you time. Before using the change on your actual files, test it out on a duplicate first.
Common Comparing Mistakes This Tool Prevents
Each of these hides real changes or invents false ones.
Diffing minified against pretty text
A line diff calls every line different. This tool ignores layout, so only data counts.
Reordered keys
The export lists may have different order of listing their keys. The ordering of keys is not significant for objects.
Position checks on records
If one record moves up, every record below it looks changed. Match by key instead.
Noisy fields
Timestamps and counts are always changing. If you pay attention to these changes you will miss the true change.
Rounded numbers
A float-converting number tool may recognize two different IDs as equivalent. The tool will compare the actual value of each.
Trusting a patch on the wrong base
A patch will fit only the document from which it was created. Apply it to Side A only.
JSON Diff Questions People Ask
Is this JSON diff online tool free?
Yes. There is no charge, no requirement for an account, and no restrictions. The work is done by your browser, so, we do not need to recover any server costs from you.
Are the two JSON files I compare sent to a server?
No. Your browser will read and compare them. We don’t get anything at our website, nor do we store anything. When you close the tab, both of those JSON files will be removed from your computer’s RAM.
How does this differ from a plain text diff?
A diff lines up two files and compares them line by line. This tool compares files. The order of keys, whitespace, and indentations are never considered differences.
Can it compare JSON with YAML?
Yes, each side has its own reader, and then they both develop into the same type of tree. Keep the setting for Detect it.
What does it do with XML?
Attributes are transformed into keys that begin with an "@" symbol. Repeating elements become a list. After that, the comparison proceeds as normal.
What does Ignore the order of list items do?
The items count as equal no matter where they sit. When we have a list of tags and the exact same tags but in a different order, there is no change.
What’s the match key for?
The software links data based on a specific attribute (e.g., ID), so an updated record does not represent a change, and editing a price will appear on a single line.
Is it possible to skip certain fields?
Yes. Enter the key names into the "Ignore" field and separate them with commas. At each level of the tree, those keys will disappear on either side.
What exactly is a JSON Patch?
It is a standard list of steps that turns one document into another. Each step adds, removes or replaces a value at a path.
Why is the patch button off?
A patch needs exact list positions. It turns off while you ignore order or match items by a key. A note below the filters tells you so.
Can it compare two API responses?
Yes, copy each response and paste it on its side. Then enter into the "ignore" box the fields that you would like the comparison tool to ignore, such as request IDs and time stamps. Since the tool compares meaning, a re-ordered response is considered to be the same response.
Will the JSON diff work on my phone?
Yes, the two columns will be stacked and the list will wrap. A computer works better for long files.
How big a file can it compare?
Files up to five megabytes open from disk. Live comparing stops above two megabytes, so press Compare now for big files.
Handy Companions For Data Work
Comparing is one step. These three tools handle the steps around it.
- Diff Checker
Compare two blocks of plain text next to each other, one line at a time.
- JSON Viewer
Read JSON as a tree or a table, then edit it.
- YAML to JSON Converter
Turn a YAML file into JSON before you compare.
Ready To Compare Two Documents?
Paste both sides and read the list of changes. The tool is free, needs no account, and keeps every byte on your device.