Compare two pieces of text and see exactly what changed, line by line.
Paste two versions of a document to see exactly what changed between them.
Two drafts
See what an editor changed
Paste both versionsConfig files
Line mode shows exact changes
Paste before and afterReworded prose
Word mode is clearer here
Switch to word comparisonOriginal on the left, changed on the right.
Lines for code and config, words for prose.
Removals in red, additions in green, with line numbers.
Longest common subsequence, the same family version control uses. An inserted line reports as one insertion instead of making everything below it look changed.
Line mode marks a whole sentence changed when one word moved. Word mode shows the word, which is what you needed to see.
Two very large and completely different documents would need a comparison table too big for a browser. The tool says so instead of hanging the tab.
Find the differences between two versions of a document. The comparison uses a longest-common-subsequence diff — the same approach version control uses — rather than comparing line one to line one. That distinction matters: with a positional comparison, inserting a single line at the top makes every line below it look changed, which is precisely the case you were trying to understand. Here an insertion reports as one insertion and the rest stays common. Word-level comparison is available for prose, case and whitespace can be ignored, and the result exports as a unified diff you can apply with patch.
Keep going
Related pages in Text Tools, plus what others are using right now.
More text tools that pair well with this one.
Count words, characters, sentences and paragraphs as you type.
Convert text between twelve cases — upper, lower, title, camel, snake and more.
Remove duplicate lines while keeping the original order, with statistics.
Sort lines alphabetically, numerically or by length, in either direction.
Count characters with and without spaces, against the limits that matter.
Replace text across a document, with optional regular expressions.
Create strong random passwords with full control over length and characters.
Format, validate and minify JSON, with errors that point to the exact line.
Work out any percentage — of a number, as a share, or as a change.
Convert between length, weight, temperature, volume, speed, data and more.
Find the mean, median, mode and range of a list of numbers, with the working shown.
See how savings grow with compounding, including regular contributions.
Sample and population standard deviation and variance, both shown, with the working.
Turn a logo into favicon.ico, the PNG sizes a site needs, and the HTML to declare them.
Check a downloaded file against its published checksum, without uploading anything.
Stamp text like DRAFT or CONFIDENTIAL across a PDF, in your browser.
Turn JSON into readable YAML, with quoting and multiline strings handled properly.
Escape text for HTML, or turn entities back into readable characters.