Text & Writing

Text Diff Checker

Find the lines that changed between a draft and its revision. Paste both versions to align unchanged lines and separate additions from removals, even when a new line shifts the rest of the document. Use it for notes, configuration snippets, checklists, and plain-text revisions.

Free online tool

Loading tool…

0 inserted, 0 deleted, 0 unchanged lines.

Line comparison: + inserted, − deleted, = unchanged. Empty text appears as [empty line].
OldNewChangeText

Line-based alignment is limited to 1,500 lines per document and 2,000,000 alignment cells. CRLF and CR become LF. A trailing newline is a final empty line. The text export is a readable comparison, not an applyable patch. Processing stays in this browser; text is not submitted to a server.

Text is processed locally in your browser. No tool input is sent to a remote processing service.

GET STARTED

How to use the Text Diff Checker

  1. 01

    Paste the earlier version into Original text and the new version into Revised text.

  2. 02

    Review the old and new line numbers. A plus marks an insertion and a minus marks a deletion.

  3. 03

    Enable edge-whitespace matching if indentation or trailing spaces are irrelevant to your review.

  4. 04

    Show only changes to shorten the on-screen report, then copy or download the full comparison.

Examples

An insertion should not mark every following line changed

Original: “Start”, “Review”, “Finish”. Revised: “Start”, “Test”, “Review”, “Finish”. The alignment reports one insertion for Test and keeps Review and Finish unchanged.

A replacement is a removal plus an addition

Changing “Run tests” to “Run all tests” produces one deleted line and one inserted line. This tool compares complete lines; it does not highlight individual changed letters.

A final newline is observable

“alpha” contains one line. “alpha\n” contains alpha followed by an empty line, so adding the final newline appears as an inserted empty line.

How line alignment works

The comparison finds a longest common subsequence of complete lines, then walks that alignment to identify unchanged, inserted, and deleted rows. This avoids the misleading cascade produced by comparing only the same line positions. When several equally long alignments exist, deletion is preferred at a tie; repeated identical lines can therefore produce one of several valid change arrangements. A moved paragraph usually appears once as deleted text and once as inserted text.

Choose the right comparison rules

Exact matching is the default: capitalization, punctuation, tabs, and internal spaces all matter. The whitespace option trims only the beginning and end of each line when deciding equality. It does not collapse interior spaces, normalize Unicode, or compare without case. An unchanged row displays the revised version, so a trimmed indentation difference can disappear from the report intentionally. Turn the option off when indentation carries meaning, as it does in Python and YAML.

Reading and exporting the report

Old and new line columns identify where each row belongs. A missing line number means the row exists in only one document. Empty lines are visibly labeled in the table; the text export preserves them as an empty row after its change marker. The changes-only switch affects the table, while the downloadable comparison always includes context from all rows. The export uses a simple marker format for review and cannot be applied as a Git or unified patch.

Working within the comparison budget

Each input allows 100,000 UTF-16 code units and 1,500 lines, including a trailing empty line. The combined alignment grid may contain at most 2,000,000 cells. A pair of documents can fit the individual line limits yet exceed that grid budget. Split a long document into sections at a stable heading and compare the corresponding sections separately. Windows CRLF and old-style CR endings are converted to LF before alignment.

What to know

  • Line-level comparison only; no word-level highlighting, file uploads, or applyable patch export.
  • At most 100,000 UTF-16 code units and 1,500 lines per input; at most 2,000,000 alignment cells.

Common questions

Can I compare Word or PDF files directly?

No. Paste their extracted plain text. Formatting, comments, embedded objects, and tracked changes are outside this comparison.

Does an unchanged result prove the files are byte identical?

No. Line endings are normalized, and optional whitespace matching can ignore edge spaces. This is a text comparison, not a byte-level file comparison.

Why does moved text show as deleted and inserted?

The algorithm preserves the sequence of unchanged lines. A move changes that sequence, so the moved lines are represented by removals and additions rather than a separate move operation.

Sources & references