Text & Code Diff Checker

Compare two texts line by line and see what changed.

2 added, 1 removed

  • Unchanged: apple
  • Removed: banana
  • Added: blueberry
  • Unchanged: cherry
  • Added: date

About this tool

When two versions of a text or a piece of code look almost the same, finding the difference by eye is slow and error-prone. This tool compares them line by line and lists every change. Paste the original on one side and the changed version on the other. Lines that were added are highlighted and marked with a plus sign, lines that were removed are struck through and marked with a minus sign, and unchanged lines stay plain, so the result still makes sense without colour. A summary at the top counts the additions and removals. You can ignore differences in spacing, which helps when code was reformatted. The comparison uses the longest common subsequence method, the same idea behind most diff tools, and it runs in your browser, so documents, contracts or source code are not uploaded. Each side is limited to 2,000 lines to keep the page responsive.

How to use it

  1. Paste the original text into the left box.
  2. Paste the changed text into the right box.
  3. Tick Ignore extra spaces if only formatting changed.
  4. Read the summary of added and removed lines.
  5. Copy the diff to share it, or scroll through the list to review each change.

How it works

The tool splits both texts into lines and finds the longest common subsequence of lines using a dynamic-programming table. Lines in that sequence are unchanged; the other lines of the first text are marked removed and the other lines of the second text are marked added. The result is one possible shortest edit list, and other equally short lists can exist.

Example: Comparing the lines apple, banana, cherry with apple, blueberry, cherry, date shows banana as removed, blueberry as added and date as added, while apple and cherry are unchanged. The summary reads 2 added, 1 removed.

Common uses

  • Checking what changed between two drafts of an essay, contract or announcement.
  • Comparing two versions of a configuration file or a snippet of code.
  • Finding the one line that differs between two long lists.

Frequently asked questions

Is my text uploaded?
No. The comparison runs in your browser and the page does not send the text anywhere.
Does it compare words or only lines?
Only whole lines. If one word in a long line changes, the whole line shows as removed and added.
Why is there a 2,000 line limit?
The comparison needs a table whose size grows with both inputs, so very large files can make a phone or an old laptop slow. Split large files first.
What does ignore extra spaces do?
It treats runs of spaces and tabs and leading or trailing spaces as the same, so reformatting is not reported as a change.
Can two different diffs both be correct?
Yes. When lines move or repeat there can be several equally short ways to describe the change, and the tool shows one of them.

Last reviewed 2026-11-01. Browse all tools