webtools

Text Diff Checker

Private: nothing leaves your browser

Paste the original on the left and the new version on the right.

Paste two versions of anything and see exactly what changed, side by side, with the changed words picked out inside a changed line. Both texts are compared on your own device, so a contract, a config file or a draft never leaves it.

About this diff checker

Comparing two versions by eye works until the texts are long enough to matter, at which point the one changed digit is exactly the one you skim past. This lines the two up, marks what was added and what was removed, and when a line has only been edited rather than replaced it highlights the words inside it that actually moved. Contracts, translations, log files, configuration and code all compare the same way. Two lists holding the same items in a different order are the one case this reads as a total rewrite, so sorting both with the sort lines tool first turns it back into the small difference it really is.

Everything happens in your browser. Neither text is uploaded, logged or stored, which is the reason to use a page like this for a document you are not allowed to paste into a random website. It also means the comparison keeps working with your connection switched off.

The three switches change what counts as a difference. Ignore case treats Monday and monday as the same line. Ignore whitespace collapses runs of spaces and ignores indentation, which is what you want when the only thing that changed is the formatting. Ignore blank lines drops empty lines from both sides so a reflowed document does not read as a total rewrite.

How to compare two texts

  1. Paste the original into the left box and the new version into the right.
  2. Read the counts under the boxes: added, removed and unchanged lines.
  3. Removed lines are marked on the left, added lines on the right. In a line that was edited, the changed words themselves are highlighted.
  4. Switch to Unified for the single column view with plus and minus signs, which is easier to read on a phone.
  5. Press Copy as patch to take the whole comparison as plain text for a message or a ticket.

Common questions about comparing text

Can I compare a confidential document here?

No. Both versions are compared by JavaScript running on this page, so they stay on your own device. Nothing is sent, logged or saved. That is what makes it reasonable to compare something confidential here.

How does it decide which lines match?

It finds the longest sequence of lines that appears in both versions in the same order, and calls everything else added or removed. That is the same idea behind the diff in every version control system, and it is why moving a paragraph shows up as a removal in one place and an addition in another rather than as a move.

Why is a whole line marked changed when I only edited one word?

The comparison works line by line first, because that is what keeps long documents readable. When a removed line and an added line are paired up, a second pass compares them word by word and highlights only the words that differ, so you still get the detail without losing the overview.

Can it compare two files?

Open each one and paste the contents in. There is no upload step because there is no server to upload to. Very large pastes are handled, though two texts with nothing at all in common are reported as one replaced block rather than lined up row by row, since there is nothing meaningful to line up.

Does it handle Windows line endings?

Yes. Carriage returns are normalised before the comparison, so a file saved on Windows and the same file saved on Linux do not come out as every single line changed, which is the usual first surprise when comparing text across operating systems.

Next

Related tools

All Dev tools