Text Diff Checker
Compare two blocks of text line by line and see additions and deletions highlighted in green and red. Runs entirely in your browser.
Pure browser JavaScript (LCS algorithm) — no libraries required.
How to use this tool
- Paste the original text on the left.
- Paste the modified text on the right.
- Click Show Diff to see added and removed lines.
Compare two blocks of text line by line and see additions and deletions highlighted in green and red. Runs entirely in your browser.
How it works
The Text Diff Checker compares two blocks of text line by line and highlights every change between them. Lines that appear only in the first block are marked as deletions (red), while lines that appear only in the second block are marked as additions (green). Lines present in both blocks are shown as unchanged context.
Paste your original text in the left panel and the revised version in the right panel, then click Compare. The diff runs entirely in your browser using a longest-common-subsequence algorithm, so no data ever leaves your device.
This tool is ideal for spotting edits in documents, checking what changed between two versions of a config file, verifying that a copy-paste preserved the original text, or reviewing contract redlines when you only have plain text.
For best results, make sure both inputs use the same line endings. If one copy came from Windows and the other from a Unix system, you may see spurious differences caused by invisible carriage-return characters.
Worked example
Check what changed between two email drafts
- Paste the original draft into the left (Old) text area.
- Paste the revised draft into the right (New) text area.
- Click Compare.
- Lines highlighted in red were removed; lines in green were added.
- Lines with no highlighting are identical in both drafts.
You can immediately see every sentence that was reworded, added, or deleted without reading both drafts in full.
Common mistakes to avoid
- Pasting text in the wrong order (revised in the left panel, original in the right) reverses the meaning of additions and deletions.
- Including trailing whitespace differences that come from different editors, causing lines to appear changed when only a space at the end differs.
- Comparing formatted text (e.g., copied from Word with smart quotes) against plain ASCII text, producing false differences for every apostrophe or dash.
Key terms
- Diff
- Short for difference; a structured list of additions and deletions that transforms one text into another.
- Longest Common Subsequence (LCS)
- The algorithm used to find the largest set of lines that appear in the same order in both texts, which determines what counts as unchanged.
- Hunk
- A contiguous block of changed lines in a diff, often surrounded by a few lines of unchanged context for readability.
Frequently asked questions
- Is my text sent to a server?
- No — the diff is computed locally in your browser using a standard LCS algorithm.