Text Compare
Paste two versions of a text to see exactly which lines changed.
About this tool
Compares the two texts line by line and finds the longest run of lines they share, then marks every other line as added (+) or removed (−). You can ignore differences in capital letters and spacing. Both texts stay in your browser.
When you have two versions of a document, a list or some code, spotting what changed by eye is slow and easy to get wrong. Paste the original on one side and the new version on the other, and the comparison highlights every line that was added or removed, with a count of the changes. Use it to check edits to a contract, compare two lists or review changes to a config file.
How to use the Text Compare
- Paste the original text into the first box.
- Paste the changed text into the second box.
- Choose whether differences in capital letters or extra spaces should count.
- Read the highlighted result: green lines with + were added, red lines with − were removed.
Comparing two shopping lists
The original list has Milk, Eggs, Bread, Butter and Apples. In the changed list, Bread has become Brown bread and Coffee has been added at the end. The comparison shows four unchanged lines, Bread as removed and Brown bread as added in its place, and Coffee as added: 2 lines added and 1 removed. A changed line always appears as one removal and one addition.
How a diff works
Programs that compare text, called diff tools, look for the longest common subsequence: the largest set of lines that appear in both versions in the same order. Everything outside that set must have been removed from the original or added to the new version. This is the same idea behind the changes view in Git and in document review tools. Comparing by line keeps the result easy to read, but it means that changing one word marks the whole line as changed. Ignoring case treats Bread and bread as the same, and ignoring spaces treats a line with a trailing space or a double space as unchanged. For very long texts with many differences, the comparison is simplified to keep your browser responsive.
Frequently asked questions
Is my text uploaded?
No. Both texts are compared in your browser and are never sent to a server.
Why is a whole line marked when I changed one word?
The comparison works line by line, so any change to a line shows it as removed and its new version as added.
Can I compare code?
Yes. It works with any plain text, including code, CSV files and configuration files. Set extra spaces to Must match if indentation matters.
Can I compare Word or PDF files?
Copy the text out of the documents and paste it in. Formatting such as bold or fonts is not compared.