LIVE
0 words
0 chars
0 lines
en-US lang

Text Diff Checker

Compare two texts and highlight the differences.

local-only instant no upload
— Text Tools Online
✎ NOTES ON THIS TOOL

Why Ctrl+F Is the Wrong Tool for Finding Differences

When you need to verify whether two versions of a document are identical — or spot exactly what changed — the instinct is to open both files side by side and scan visually. For short texts, this works. For anything longer than a paragraph, human eyes start missing things: a transposed letter, a changed number, a sentence that was silently reordered. Ctrl+F only finds what you already know to look for.

A diff tool does something categorically different: it computes the minimum edit distance between two texts and surfaces only what changed, not what stayed the same. You stop hunting and start verifying.

How the Comparison Algorithm Works

This tool uses the Longest Common Subsequence (LCS) algorithm — the same foundation used by Unix diff, Git, and most code review systems. The algorithm finds the longest sequence of lines (or characters) that appear in both texts in the same order, then marks everything outside that sequence as either added or removed.

The result is a minimal diff: it shows you the smallest set of changes that transforms the original into the modified version. This matters because a naive comparison might flag a moved paragraph as "everything deleted, then everything added," while LCS correctly identifies that the paragraph content itself is unchanged and only its position shifted.

Line-Level vs Character-Level Diff

Most diff tools operate at the line level by default — a line is either unchanged, added, or deleted. This is efficient for code and structured documents. For prose editing, a character-level (or word-level) diff is more useful: it shows you that "the quick brown fox" became "the fast brown fox" with only the word "quick" replaced, rather than showing the entire line as deleted and re-added.

This tool highlights differences at the word level within changed lines, giving you a clearer picture of exactly what was altered.

Practical Scenarios

  • Contract review: Verify that the version you signed matches the version sent back by the other party.
  • Configuration files: Confirm that a production config differs from staging in exactly the expected ways — and nothing else.
  • API responses: Compare two API responses during debugging to isolate which field changed between requests.
  • Content editing: Review an editor's changes to your article without relying on Track Changes being enabled.
  • Localisation strings: Ensure a translated file has the same number of keys as the source file, with no entries missing or duplicated.

Questions

01 Do whitespace and blank lines count as differences? +

By default, yes — a line with a trailing space and the same line without one are treated as different. This is intentional because whitespace differences matter in code (Python indentation, YAML structure) and in some document formats. If you want to ignore whitespace, enable the "ignore whitespace" option, which normalises all whitespace sequences to a single space before comparing.

02 What does it mean when a large block shows as entirely deleted and re-added? +

This usually means the content was significantly rearranged or reformatted, so the LCS algorithm could not find enough common lines to anchor around. Try switching to character-level diff mode, or manually align the sections you want to compare and paste them separately.

03 Can I compare files in different languages or encodings? +

The tool works on any Unicode text, so it handles Latin, CJK, Arabic, and other scripts. Paste the text directly — do not compare raw binary files or non-UTF-8 encoded content, as encoding artefacts will appear as false differences.

04 How is this different from the diff in Google Docs "Version History"? +

Google Docs version history only works within Google Docs and requires both versions to have been saved within the same document. This tool works on any two pieces of text from any source — two emails, two PDFs you copied from, two terminal outputs — with no account or file format requirements.