The Next JSON Toolbox

Compare the Two

Compare 2 texts, files, JSON objects or lists online. Paste or upload both sides (up to 1 MB each) and every added, removed and changed line is highlighted.

Sample:
Lines:0Chars:0
Lines:0Chars:0
Compare as

JSON Tools

Array Tools

How to Compare the Two

Paste two inputs or upload two files. The tool detects whether you are comparing text, JSON or a list and shows the differences accordingly.

Compare Two Texts

Compare two versions of a document line by line. Changed words inside a line are highlighted too.

Text A
Weekend Picnic Plan
Meet at Maple Park at 10am
Bring sandwiches and lemonade
Games: frisbee and cards
Leave by 3pm
Text B
Weekend Picnic Plan
Meet at Maple Park at 11am
Bring sandwiches, fruit and lemonade
Games: frisbee and cards
Don't forget the blanket
Leave by 4pm
Differences
1
Weekend Picnic Plan
1
Weekend Picnic Plan
2
Meet at Maple Park at 10am
2
Meet at Maple Park at 11am
3
Bring sandwiches and lemonade
3
Bring sandwiches, fruit and lemonade
4
Games: frisbee and cards
4
Games: frisbee and cards
5
Don't forget the blanket
5
Leave by 3pm
6
Leave by 4pm

Compare Two JSON Objects

JSON is formatted and its keys sorted before comparing, so only real value changes show up.

Text A
{"name":"Sunny Bean","open":"8am-6pm","menu":["Honey Latte","Matcha Cloud"],"wifi":false}
Text B
{
  "wifi": true,
  "name": "Sunny Bean",
  "menu": ["Honey Latte", "Lavender Dream"],
  "open": "7am-8pm"
}
Differences
1
{
1
{
2
"menu": [
2
"menu": [
3
"Honey Latte",
3
"Honey Latte",
4
"Matcha Cloud"
4
"Lavender Dream"
5
],
5
],
6
"name": "Sunny Bean",
6
"name": "Sunny Bean",
7
"open": "8am-6pm",
7
"open": "7am-8pm",
8
"wifi": false
8
"wifi": true
9
}
9
}

Compare Two Lists

Find items that are only in the first list, only in the second list, or in both. Order does not matter.

Text A
apple
banana
cherry
grape
mango
Text B
["banana", "kiwi", "apple", "peach", "mango"]
Differences
Only in A2
  • -cherry
  • -grape
Only in B2
  • +kiwi
  • +peach
In Both3
  • =apple
  • =banana
  • =mango

Frequently Asked Questions

How do I compare the two texts?

Paste the first text on the left and the second text on the right. The comparison runs automatically and highlights added lines in green, removed lines in red and changed words inside a line.

Can I compare 2 files?

Yes. Click Upload or drag a file onto each side. Any plain-text file up to 1 MB works: .txt, .json, .csv, .md, .log, .xml, .yaml, source code and more. Files are read in your browser and never uploaded to a server.

What formats can I compare?

Plain text is compared line by line. JSON is formatted (and keys sorted, if you choose) before comparing, so formatting and key order do not create false differences. Lists and arrays are compared as sets, showing items only in A, only in B and in both.

How does auto detect work?

If both sides are JSON arrays of simple values the tool compares them as lists; if both are other valid JSON it compares them as JSON; everything else is compared as text. You can always override this with the Compare as buttons.

Can I ignore whitespace or letter case?

Yes. Turn on Ignore whitespace to treat lines that differ only in spaces or tabs as equal, and Ignore case to treat upper and lower case letters as the same.

Does this site store my data in the cloud?

No, this site does not store or share your data in the cloud. Your data remains private and is kept locally on your browser.

This site lacks some useful features that I need. Can you add them?

Yes, we welcome all suggestions! Please feel free to share your feedback using the link at the bottom of the page.