How to compare two texts
- Paste the original text on the left and the changed text on the right.
- Choose whether to compare by lines, words or characters, and whether to ignore whitespace or case.
- Click Compare. Additions are highlighted in green, removals in red and struck through.
What people use a diff checker for
- Reviewing changes between two versions of a contract, essay or policy.
- Finding what changed in a config file or code snippet without a Git repository.
- Checking that copied text matches the source exactly.
- Comparing API responses before and after a change.
Related: JSON Formatter, Regex Tester.
How the comparison works
The checker finds the longest sequence of content the two texts have in common and then marks everything else as added or removed. In line mode, a line that changed slightly appears as one removed line followed by one added line. Switch to word or character mode to see exactly which words or characters inside the line changed.
Ignoring noise
- Ignore whitespace treats lines as equal when they differ only in spaces, tabs or indentation, which is useful when code was re-indented or reformatted.
- Ignore case treats “Hello” and “hello” as the same, helpful for comparing lists of names, emails or keywords.
- Windows (CRLF) and Unix (LF) line endings are normalized automatically, so files from different operating systems compare cleanly.
Comparing documents
To compare Word documents or PDFs, copy the text out of each document and paste it here. Word mode works best for prose: it highlights edited words within paragraphs instead of flagging the whole paragraph. For contracts and policies, this quickly shows whether anything besides the expected clauses was changed.
Comparing lists
Put one item per line in each box and compare by lines to see which items were added or removed between two versions of a list, such as product SKUs, email subscribers or configuration keys. Sort both lists alphabetically first if their order does not matter.
Reading the result
Lines starting with + and highlighted in green exist only in the changed text. Lines starting with −, highlighted in red and struck through, exist only in the original. Unmarked lines are the same in both. The summary above the result counts how many lines, words or characters were added and removed, which is a quick way to judge how big an edit is before reading it in detail.
Privacy for sensitive text
Comparing contracts, medical letters, source code or customer data in an online tool can be risky when the text is sent to a server. Here the comparison runs entirely in your browser using an open-source diff algorithm, and nothing you paste is uploaded or stored. You can close the tab when you are done and the text is gone.
Frequently asked questions
Is my text uploaded?
No. The comparison runs in your browser, so contracts, code and private documents stay on your device.
Lines, words or characters?
Use lines for code and config files, words for prose and documents, and characters to spot tiny differences such as a changed digit or punctuation mark.
Can I compare two JSON files?
Yes. For best results, first format both with the JSON Formatter using "Sort keys", then compare by lines.