Text Diff

Compare two blocks of text and highlight added, removed, and unchanged lines side by side.

Original Text
Modified Text

Frequently Asked Questions

This tool uses a line-level Longest Common Subsequence (LCS) algorithm β€” the same basis as the Unix diff command. It finds the largest set of unchanged lines and marks the rest as added or removed.

Lines highlighted in green (prefixed with +) are present in the modified text but not in the original. Lines in red (prefixed with βˆ’) were in the original but removed. Unchanged lines are shown without color.

This is a line-level diff. Each line is treated as an atomic unit β€” if a single character changes, the entire line is shown as removed and re-added. This is the standard behaviour of git diff and the Unix diff utility.

How It Works

Paste Both Versions

Enter the original text in the left panel and the revised version in the right panel. The diff updates in real time as you type.

LCS Algorithm

The tool uses a Longest Common Subsequence (LCS) algorithm β€” the same basis as Unix diff β€” to identify the minimal set of added and removed lines.

Color-coded Output

Green lines are additions (+), red lines are removals (βˆ’), and neutral lines are unchanged. A summary shows total added/removed/unchanged counts.

Common Use Cases

Document Version Comparison

Compare drafts of contracts, reports, or articles to see exactly what changed between versions, without relying on tracked changes in Word.

Code Review

Quickly compare two versions of a configuration file, script, or snippet outside a full IDE, or before committing to version control.

Translation QA

Compare source and translated strings line by line to verify all segments are present and no lines were accidentally skipped or duplicated.

Editing & Proofreading

Show editors the exact changes made to an article draft. Line-level diff makes it easy to accept or reject individual changes.

Config File Auditing

Compare production and staging config files to find environment-specific differences that could cause deployment bugs.

Plagiarism Spot-check

Compare a submitted piece against an original source to find copied or lightly rephrased passages before publishing or grading.