Developer Text Diff Checker

Text Diff Checker

Paste two versions of a text to see exactly what changed, word by word or line by line.

+2 added-1 removed
The quick brown fox jumpsleaps over the lazy dog.
This line stays the same.
This line was added.

How to use this tool

Paste the original on the left and the changed version on the right. The comparison below updates as you type: added text in green, removed text in red and struck through. Switch between Word-level and Line-level depending on what you are comparing.

Worked example: a changed payment clause

Original: "Payment is due within 30 days of the invoice date. Late payments incur interest at 1.5% per month." Revised: the same sentence with 45 days and 2%. Word-level marks exactly two changes, 30 → 45 and 1.5 → 2, and leaves the rest as unchanged text, which is what you want when checking a contract that came back "with minor edits". Line-level would mark the whole paragraph as removed and re-added, because it is one line.

Changes each mode can hide or exaggerate

  • Word-level ignores spacing. A double space turned into a single one shows no change at all. Capitals and punctuation do count: "The client shall pay." against "the client shall pay" marks both the capital and the full stop.
  • Line-level flags a whole line for one invisible character. host=db1 with a trailing space shows as a removed and re-added line that looks identical. If a line is marked but you can't see why, switch to Word-level or look for spaces at the end.
  • A missing final line break makes the last line show as changed in Line-level, even when its text is the same.

Frequently Asked Questions

Can I compare two Word documents or PDFs?

Copy the text out of each and paste it in. Formatting such as bold, fonts and tables isn't compared, only the words. Text copied out of a PDF keeps the PDF's line breaks, so if a sentence was rewrapped between versions, Line-level flags every line whose break moved; Word-level compares the words and ignores where the lines end.

Why doesn't this diff look identical to what git shows for a file?

Git's diff algorithm and this tool both aim to find a minimal, readable difference between two texts, but different diff algorithms can produce different (equally valid) ways of representing the same change, especially when text has been reordered or when similar lines appear in multiple places. Both are showing a correct diff — just not necessarily an identical one.

Is my text uploaded anywhere?

No. The comparison runs entirely in your browser using a JavaScript diff library — neither text is sent to a server, which matters if you're comparing anything sensitive like a contract draft or private correspondence.

Related Tools

Related Blog Posts