Text Compare (Diff)
Highlight the differences between two texts.
Enter two texts and press Compare.
What is text compare?
The text compare (diff) tool lines up two texts line by line and highlights which lines were added or removed. Paste an old and a new version to see the changes at a glance — handy for reviewing document edits or code changes.
How to use it
Paste the previous version into Original text and the new version into Text to compare, then press Compare. Each line is shown as green (+) = added, red (−) = removed, or unmarked = unchanged. Everything runs in your browser — nothing is sent to any server.
How it works (line-based LCS)
Both texts are split by line break, then a Longest Common Subsequence dynamic-programming pass aligns as many common lines as possible.
- Common lines — present in both (unmarked)
- Removed lines — only in the original (− red)
- Added lines — only in the compared text (+ green)
Note: Comparison is line-based, so an edit within a line shows that whole line as removed plus added.
Privacy & large text
- No upload: your text is never stored or sent — it stays in your browser.
- Large text: a few thousand lines per box work smoothly. Very large inputs (over 5,000 lines each) are limited, so split by section.
FAQ
What is text compare (diff) for?
Paste two versions of a document to see which lines changed. It's useful for comparing contract or spec revisions, checking code changes, reviewing translations, and any case where you need to spot what changed quickly.
How does line-based comparison work?
Both texts are split by line break, then a Longest Common Subsequence (LCS) dynamic-programming pass aligns as many common lines as possible. Lines only in the original are marked removed (−, red), lines only in the compared text are added (+, green), and shared lines are shown as-is.
Is my text sent to a server?
No. All comparison runs in your browser; your text is never uploaded or stored, so you can safely paste sensitive content such as contracts or source code.
Can it compare very large texts?
A few thousand lines per box compare smoothly. Line-based LCS scales with the product of the two line counts, so very large files (over 5,000 lines each) are limited to protect the browser, with a notice shown. Split by paragraph or section in that case.
How should I use it?
Paste the previous version on the left (original) and the new version on the right, then press Compare. Green lines were added, red lines were removed, unmarked lines are unchanged. The summary's added/removed line counts show the size of the change.
Advertisement