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
- Paste the original text into the left box.
- Paste the changed text into the right box.
- Tick Ignore extra spaces if only formatting changed.
- Read the summary of added and removed lines.
- 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?
Does it compare words or only lines?
Why is there a 2,000 line limit?
What does ignore extra spaces do?
Can two different diffs both be correct?
Related tools
Last reviewed 2026-11-01. Browse all tools