About JSON Compare
A diff checker is a tool that compares two versions of a text and marks what changed. This one compares line by line using a longest common subsequence (LCS) algorithm: lines only in the original are marked with a minus, lines only in the new text with a plus. Options ignore edge whitespace and letter case. It does not highlight changes within a line, and the inputs are limited to roughly 2,000 lines per side.
Also known as: JSON Diff.
How to use JSON Compare
- Type or paste into the "Original text" box and the "Changed text" box, or press "Use example" to try it with sample data.
- Set "Ignore whitespace at line edges" and "Ignore letter case" if the defaults do not fit.
- The result appears below and updates as you type.
- Copy the result with the copy button, or download it as a file where that is offered.
Questions about JSON Compare
Why is a whole line marked as changed when I edited one word?
The comparison works on full lines. Any difference inside a line makes it count as one removed line and one added line. Character-level highlighting within a line is not available.
How does the JSON comparison ignore key order?
Both inputs are parsed, object keys are sorted alphabetically at every level, and the result is re-indented with two spaces before the line comparison. Array order is kept, because order is significant in JSON arrays.
Runs in your browser. Page last updated .