More
More
Diff Checker
See what changed between two texts or two JSON files.
Free tools that run in your browser. Nothing you type, open or create is uploaded to NerdBible or anyone else.
Changes appear here as you type.
Lines are compared with the Myers difference algorithm, the same idea behind git diff. When a line changed, the words that differ are highlighted inside it. Side by side on a wide screen, one column on a phone.
How to use it
- Paste the original text on the left, or on top on a phone.
- Paste the changed version in the second box. The comparison updates as you type.
- Read the result: removed lines are red, added lines are green, and the words that changed inside a line are highlighted.
- For two JSON documents, open the JSON tab. Both are read as data and compared by structure, so key order and formatting do not matter; every added, removed and changed value is listed with its path.
Questions
Is my text uploaded to compare it?
No. Both texts are compared in your browser. Nothing is sent or saved, so contracts, code and drafts stay on your device.
What does Ignore spaces do?
It treats lines as equal when they differ only in spaces or tabs, for example after a reformat. The text shown is still your original.
Can it compare code?
Yes. Any plain text works, including source code, JSON, CSV and configuration files. For JSON, the JSON tab compares the data itself rather than the text.
How does the JSON comparison work?
Both sides are parsed, then walked together key by key. Objects are matched by key name, so the same keys in a different order count as equal, and spacing or indentation never matters. Each difference is listed with its path, such as $.user.roles[1], and marked as added, removed, changed or changed type (for example a number that became a string).
Can the JSON comparison ignore the order of array items?
Yes. Tick Ignore the order of items in arrays and each array is compared as a set of items: an item that appears on both sides counts as unchanged wherever it sits, and the rest are listed as added or removed.
How large can the texts be?
Tens of thousands of lines are fine on a laptop. When two very long texts have almost nothing in common, the tool shows them as fully replaced instead of searching for a detailed match.
About this tool
About the diff checker
Paste an original and a changed version of any text and the differences are marked: removed lines in red, added lines in green, and the words that changed inside a line highlighted. It is the quickest way to see what someone edited in a contract, a policy, an essay or a block of code.
How the comparison works
Lines are matched with the Myers difference algorithm, the same idea behind git diff, which finds the smallest set of changes that turns one text into the other. Within each changed line, the individual words are compared too, so a single altered number does not hide in a long paragraph. On a wide screen the texts sit side by side; on a phone they stack.
Comparing JSON
The JSON tab parses both documents and walks them together. Objects are matched by key, values are compared by type and content, and every difference is marked as added, removed, changed or changed type, for example a number that became a string. Tick Ignore the order of items in arrays to treat arrays as sets.
Tips
- Tick Ignore spaces when the texts were reformatted and you only care about real changes.
- For JSON, open the JSON tab: both sides are compared as data, so key order and layout never count as changes, and each difference is listed with its path, such as $.user.roles[1].
- Any plain text works: source code, CSV, configuration files or text pulled out of PDFs.
Tens of thousands of lines are fine on a laptop. Two long texts with almost nothing in common are shown as fully replaced.
Both texts are compared in your browser. Nothing is sent or saved, so drafts and confidential documents stay on your device.
Related tools
- JSON Formatter & ValidatorPretty-print, minify and validate JSON.
- Sort & Dedupe LinesSort, reverse, shuffle and remove duplicate lines.
- Word Counter & ReadabilityWords, characters, sentences and reading time, plus reading ease, grade level, long sentences and passive voice.
- Code Formatter & MinifierFormat or minify HTML, CSS, JavaScript, SQL, XML, YAML and GraphQL, and check XML.
- PDF to TextPull the text out of a PDF to copy or save.