Text Compare
Compare two texts side by side and highlight differences. Free online text diff tool - find additions, deletions, and changes.
Three steps to get started
Paste original text
Paste the original (older) version of your text in the left field.
Paste modified text
Paste the modified (newer) version in the right field.
Click Compare
Added lines shown in green, removed lines in red, unchanged in grey.
Find differences between two texts instantly
A text diff is a structured comparison of two versions of the same text that reports which lines were added, which were removed, and which stayed the same. It answers a question that reading side by side cannot answer reliably: after a round of edits, what actually changed? Human eyes are poor at spotting a single altered digit in a config file or one substituted clause in a contract; a diff finds it in milliseconds.
The comparison uses the Longest Common Subsequence algorithm. LCS finds the longest sequence of lines that appears in both texts in the same relative order; anything outside that sequence must therefore be an insertion or a deletion, and what remains is the smallest edit script that turns the original into the modified version. This is the foundation of Unix diff, written by Doug McIlroy and James Hunt at Bell Labs in 1976, and of the Myers algorithm that git diff uses today. The output convention you see here - plus for added, minus for removed - is the same one those tools established.
Results are color-coded:
- Green (+) - lines added in the modified text
- Red (−) - lines removed from the original
- Grey (space) - unchanged lines
A summary at the top shows the total count of added, removed, and unchanged lines. Note that a modified line has no special colour of its own - LCS represents an edit as a deletion of the old line immediately followed by an addition of the new one, so a single changed word shows up as one red line paired with one green line.
When a text diff is the right tool
- Contract and policy review - confirm that the "minor wording change" in a returned draft really was minor
- Config drift - compare a staging
.env,nginx.conf, or Kubernetes manifest against production - Editorial revisions - see exactly what a copy editor or a language model altered in your draft
- Translation and transcription QA - verify a text was reproduced faithfully
- Data export verification - check that two CSV dumps taken at different times match line for line
- Plagiarism and duplication checks - measure how much of two documents is genuinely shared
Two habits make diffs far more readable. Normalise line endings first: a file saved on Windows with CRLF compared against a Unix LF file can report every single line as changed even when the content is identical. And keep lines short - because this is a line-level diff, a document written as one enormous paragraph per line will flag the whole paragraph as changed over a single comma. Reflowing prose to one sentence per line before comparing produces a far more precise result.
Both texts are compared by JavaScript running inside this page. Nothing is uploaded and no copy is retained, so unreleased contracts, private drafts, and credentials in a config file can be pasted without leaving your machine. Need word-level highlighting or a side-by-side view? Our Diff Checker tool adds both on top of the same comparison.