Text Compare (Diff Checker)
Free diff checker: compare two texts and highlight the differences line by line and word by word, side by side or unified. Your text never leaves your browser.
Everything happens in your browser. Nothing is uploaded.
Find every change between two texts
Reading two versions of a contract, an essay or a config file line by line is slow, and small changes are easy to miss. Paste the old version on the left and the new one on the right, and this diff checker marks every line that was removed, added or left unchanged. Inside changed lines it can also highlight the exact words that differ, so a single changed number or a missing “not” stands out at once. Everything runs in your browser, so private documents never leave your device.
How to use it
- Paste the first version into Original text and the second into Changed text.
- Choose a View: Side by side shows the two versions in parallel columns, Unified shows one list with removed lines marked − and added lines marked +.
- Turn on Highlight changed words inside lines to see word-level changes, and use Ignore whitespace differences or Ignore upper/lower case when spacing or capitals do not matter.
- Press Compare. The summary counts lines added, removed and unchanged.
- Use Swap texts to reverse the direction, or Copy diff to copy the unified result as plain text.
How the comparison works
- The tool uses the Myers diff algorithm (Eugene W. Myers, 1986), the same idea behind the diff in Git. It finds the shortest list of deletions and insertions that turns the original into the changed text.
- Matching lines at the start and end are set aside first, so long documents with a small edit in the middle are fast.
- When a removed line and an added line sit in the same place, the same algorithm runs again on their words to mark exactly what changed.
- To keep the page responsive, very large inputs (over 50,000 lines in total) or texts with thousands of separate changes are stopped with a message. Compare smaller parts in that case.
Worked example
The original list has four lines: apples, bananas, cherries, dates. The changed list reads apples, blueberries, cherries, dates, elderberries. After Compare, the summary shows 2 lines added, 1 line removed and 3 unchanged lines. In the side-by-side view, “bananas” is marked as removed and “blueberries” as added on the same row, while “elderberries” appears as a new line at the end. The unified diff copies as: apples, − bananas, + blueberries, cherries, dates, + elderberries.
Tips for cleaner results
Text copied from PDFs or web pages often has extra spaces or different line breaks, which show up as changes. Turn on Ignore whitespace differences to hide them. Comparing code? Keep the case setting off, because capital letters matter in most languages. For prose, one paragraph per line gives a clearer picture than long wrapped paragraphs. The tool compares plain text only; for Word or PDF files, copy the text out first.
Need numbers about the text itself? The Word Counter counts words, sentences and reading time, and the Case Converter changes capitals before you compare.
Frequently asked questions
Are my texts uploaded anywhere?
No. The comparison runs entirely in your browser. Nothing is sent to a server or stored.
What does the unified view mean?
It lists both versions as one: lines starting with − exist only in the original, lines starting with + only in the changed text, and unmarked lines are the same in both.
Why is a whole line marked when I changed one word?
The diff works line by line. Turn on word highlighting to see exactly which words inside the line changed.
Can I compare code?
Yes. Any plain text works, including source code, JSON, CSV and logs. Leave the case option off for code.
How long can the texts be?
Up to 50,000 lines in total. Very different texts may be stopped earlier to keep your browser responsive.
Does it compare Word or PDF files?
Not directly. Copy the text from the document and paste it into the two boxes.