Quick answer: A text compare tool finds the longest run of lines two texts share and marks everything else as added or removed. Green lines exist only in the changed text, red lines only in the original, and grey lines are the same. Turn on “ignore extra spaces” or “ignore capital letters” to hide differences that do not matter.
When two versions of a document, a contract clause, a piece of code or a list look almost the same, spotting the difference by eye is slow and unreliable. A text compare tool does it in an instant, marking every line that was added or removed.
Paste the original on the left and the changed version on the right. Additions are shown in green, removals in red, and unchanged lines in plain gray. You can ignore capital letters or extra spaces, and hide unchanged lines to see only what moved.
How the comparison works
The tool compares the two texts line by line and finds the longest sequence of lines they share, called the longest common subsequence. Lines in that shared sequence are unchanged. Anything else in the original is marked as removed, and anything else in the changed text is marked as added.
- Ignore capital letters treats “Hello” and “hello” as the same line.
- Ignore extra spaces trims each line and treats runs of spaces or tabs as a single space.
- Show changes only hides unchanged lines so you can focus on the edits.
A line that was edited shows up as one removed line and one added line. For very long texts (more than about 2,000 lines each) the tool asks you to compare a smaller section, since the comparison is done in your browser.
A worked example
Example. Comparing “jumps over the lazy dog” with “jumps over the sleepy dog” marks the first line as removed and the second as added, and keeps unchanged lines in gray. Use “Load an example” to see it working.
Real-world examples
Checking an edit. Compare “The quick brown fox / jumps over the lazy dog. / This line stays the same. / Old last line” with a version that changes “lazy” to “sleepy” and adds a new line before the last one. The tool reports 2 added lines, 1 removed line and 3 unchanged lines, and shows exactly which ones. Press “Load an example” to see it.
Reviewing a contract or a policy. Paste the old and new wording to see every added, removed or reworded clause without reading both documents line by line. Tick “ignore extra spaces” if one version was copied from a PDF and has different spacing.
Comparing two lists. Two sorted lists of names, product codes or email addresses show at a glance which entries were added or dropped between one export and the next.
Common mistakes to avoid
- Comparing texts with different line endings or trailing spaces and seeing every line marked as changed. Tick “ignore extra spaces” to remove that noise.
- Expecting word-level marks inside a changed line. This tool compares whole lines, so a one-word edit shows the old line as removed and the new line as added.
- Pasting confidential documents into a tool that uploads them. This one compares in your browser and sends nothing.
Frequently asked questions
Is my text uploaded anywhere?
No. The comparison runs in your browser. Nothing you paste leaves your device, so it is safe for private documents.
Why does an edited line show as removed and added?
The comparison works on whole lines. When a line is changed, the old version is marked removed and the new version is marked added, side by side.
Can I compare code?
Yes. Text is text. Paste two versions of a file to see which lines changed. Turning on “ignore extra spaces” helps if the difference is only indentation.
Can it compare Word documents or PDFs?
Not directly. Copy the text out of each document and paste it into the two boxes. Formatting such as bold or fonts is not compared, only the words.
People also search for this as: compare two texts, diff checker online, find differences between two files, text comparison tool, compare documents, side by side text compare.
Sources and further reading
Formulas on this page are checked by automated tests against independent references. See how we test our tools.