Home/Tools/Text Compare — Word & Line Diff Checker
Data & text

Text Compare — Word & Line Diff Checker

Compare two texts by word or line. Highlight additions and deletions, inspect whitespace changes and download a report. No text uploads.

✓ LOCAL PROCESSING✓ FREE · NO ACCOUNTREVIEWED 2026-10-25

01 / Input

02 / Result

Ready when you are.

Your result will appear here.

How to use this tool

  1. Paste the first version into Original text and the revision into Updated text.
  2. Choose word or line comparison, then select Compare texts.
  3. Inspect added and removed text. Copy or download a report containing the counts and both full inputs.

Quick reference

Text Compare — Word & Line Diff Checker: assumptions and output
SettingValue / behavior
Comparison modesWord/punctuation/whitespace tokens · complete lines
MatchingCase-sensitive; whitespace retained from browser text fields
Input limit100,000 UTF-16 characters per field
Alignment budget2 million cells; labeled coarse fallback for larger changes
DownloadUTF-8 report with counts and both original texts

Compare revisions with the right granularity

Place the earlier version in Original text and the revision in Updated text, then choose Compare texts. Word mode separates runs of Unicode letters, numbers, combining marks and underscores from punctuation and whitespace. It is useful for spotting small edits in sentences while still detecting changed spacing. Line mode treats each line, including its terminating line break where present, as one comparison unit. Use it for short configuration excerpts, lists or line-oriented notes. Letter case always matters. The comparison uses the current text-field values without trimming them. Browsers normally normalize pasted CRLF to LF in text fields, so this is not a byte-for-byte file comparison. Trailing newlines and changed whitespace can still be real differences.

Read highlights and counts correctly

Unchanged text appears normally. Added text is highlighted, underlined and marked with a plus; removed text has a different highlight, a strike through and a minus. These markers belong to the interface and are not inserted into your source texts. The result combines both versions so that the location of a replacement can be inspected. Counts report added and removed comparison units plus Unicode code-point counts. In word mode, whitespace runs and individual punctuation marks are units as well as words, so the token count is not a linguistic word count. In line mode, replacing a line generally adds one unit and removes one. Whitespace-only changes can be subtle visually; inspect the counts too.

A bounded algorithm for large changes

The comparison first removes matching prefix and suffix units from the region needing alignment. It then uses a longest-common-subsequence calculation within a budget of two million table cells, retaining unchanged units and reporting additions and removals between them. Repeated text can admit several equally short edit sequences, so the selected highlights are one valid alignment rather than an explanation of author intent. If the unmatched region exceeds the calculation budget, the tool clearly labels a coarse changed-block comparison: the whole old middle block is removed and the whole new middle block is added. Counts then cover those complete blocks and must not be interpreted as a minimal edit count. Neither mode silently truncates source text.

Limits, privacy and exported reports

Each input field accepts up to 100,000 UTF-16 characters. A long common prefix can still compare precisely because only the unmatched middle needs the table calculation. The computation budget also bounds memory and keeps very different inputs from triggering an unbounded quadratic comparison. Copy result and Download result export a plain-text report with the comparison status, counts and both full input texts; they do not export a patch file or the visual highlighting. Characters are displayed through text nodes, so pasted HTML and scripts appear as literal text rather than running. Editing a field or switching granularity clears the previous result. Processing stays locally in this page; no text is uploaded or saved to browser storage.

Frequently asked questions

Does it compare files or documents?

This version compares pasted plain text. It does not parse PDF, Word or rich-text formatting.

Why does the token count include spaces?

Word mode retains whitespace and punctuation as separate comparison units, so spacing edits remain visible and reconstructing either input loses no characters.

What does coarse changed block mean?

The unmatched region was too large for the fixed alignment budget. The tool shows the entire old region as removed and the new region as added, preserving both full texts.

Is the downloaded report a patch?

No. It contains the comparison status, counts and the two full source texts. It is a readable reference rather than a machine-applicable patch.

About this tool

Built and maintained by Mihai at Void Fabric. This page documents the behavior of the current implementation. Found an error or an unclear assumption? Send a reproducible example with sensitive values removed.