Skip to content
Reembun
Text diff icon
Text

Text compare

Compare two blocks of text and see exactly what changed, by line or by word, with insertions and deletions marked.

Ready. Runs locally on your device.

Your files stay on your device. The tool works directly in your browser, using your device to process your files. Nothing is sent to our servers, and we never receive, store, or see your files or figures.

Share

Share this page

Share result

Your results

Use the tool above first. Whatever it works out shows up here, ready to copy or share.

Cite

Cite this page

Reembun. (2026, July 28). Text compare. https://reembun.com/text-diff
Pick a style, then copy the reference. The access date is today.

How to use it

  1. Paste both versions

    The original on one side, the changed version on the other.

  2. Choose how fine to compare

    Compare by word, by line or by character, depending on how small the edits are.

  3. Ignore the noise

    Ignore case and ignore whitespace stop reformatting and indentation changes from drowning the real edits.

  4. Read the differences

    Additions and removals are marked in place. Only show changes hides the identical parts of a long document.

How the comparison works

The naive approach compares line 1 against line 1, line 2 against line 2, and so on. Insert a single line at the top and every subsequent line reports as changed, which is useless precisely when you most need the tool.

This one computes a longest common subsequence instead: the longest ordered set of lines present in both texts. Anything outside that sequence is an insertion or a deletion. Adding a line marks one line.

The implementation trims the common prefix and suffix first, so on two large and mostly-identical files the table it has to build is only as big as the region that actually differs.

Line mode versus word mode

Line mode treats each line as a unit. Right for code, configuration files, CSV data and anything where line structure is meaningful.

Word mode treats each word as a unit. Right for prose, where changing one word in a paragraph should show as one changed word rather than a wholly rewritten paragraph.

Ignore options

Ignore case compares without regard to capitalisation. Useful when a rename has changed casing conventions and you want to see the substantive edits.

Ignore whitespace collapses runs of spaces and trims each line. Useful when re-indentation has touched every line and you need to see what actually changed underneath.

Both affect only the comparison. The text displayed is always your original, unmodified.

What the counts mean

  • Added: units present in the changed text but not the original
  • Removed: units present in the original but not the changed text
  • Unchanged: units common to both

A modified line shows as one removed and one added, because a diff of this kind has no separate concept of “changed”: a replacement is a deletion followed by an insertion.

Where it is useful

Contract and document review. Comparing two versions of an agreement where no tracked changes were kept.

Configuration drift. Comparing a working config against a broken one.

Copy review. Seeing exactly what an editor changed, in word mode.

Data checks. Comparing two exports to find rows that moved or changed.

Limits

Comparison cost grows with the product of the two lengths, so very large inputs are refused rather than freezing the tab. Two files of a couple of thousand lines each are comfortable; two of ten thousand are not. For files that large, a command-line diff or your version control system is the right tool.

Reordering is reported as a deletion plus an insertion, not as a move. That is inherent to this class of algorithm, since detecting moves requires a different and considerably more expensive approach.

Common questions

Why does inserting one line not mark everything after it?

Because the comparison uses a longest-common-subsequence walk rather than comparing line 1 to line 1, line 2 to line 2 and so on. Positional comparison marks every line after an insertion as changed, which is exactly the situation people open a diff tool to understand.

What is the difference between line mode and word mode?

Line mode compares whole lines and is right for code, configuration and data. Word mode compares individual words and is right for prose, where a changed word in the middle of a paragraph should not mark the whole paragraph.

Does ignoring case change my text?

No. Ignoring case and whitespace affects only the comparison keys. The original text is what gets displayed. Turning on ignore-case will not lowercase your output.

Is my text sent anywhere?

No. The comparison runs in this tab. That matters for the usual use cases here: contract drafts, unpublished copy and configuration files are exactly the kind of thing people paste into a diff tool without thinking about where it goes.

Last reviewed