Text Diff Checker
Compare two text versions by line, identify real additions and removals, and download a unified patch. Optional whitespace comparison stays under your control.
Read the change, line by line.
IN YOUR BROWSER / PRIVATE INPUTHow to use the
Text Diff Checker
- 01
Paste both versions
Put the original text in Before and the revised text in After. Keep line breaks when comparing source code or structured documents.
- 02
Choose whitespace behavior
Leave literal comparison enabled when indentation matters. The optional ignore rule disregards leading and trailing whitespace on each line; interior spacing still matters.
- 03
Inspect and export
Read additions and removals, check the line counts and download the unified patch. The comparison runs in a browser worker.
A text diff explains edits, not meaning
The algorithm compares sequences of lines and groups unchanged, added and removed segments. Replacing one line commonly produces one removal and one addition. Moving a paragraph may appear as deletion plus insertion; this is not a claim that its meaning changed.
This tool compares text literally. It does not understand programming-language semantics, document formatting or whether a statement is accurate. Two implementations can behave identically and still produce a large diff; a one-character change can also introduce a major bug. Use the result to direct your review.
Follow a small revision without rereading everything
For an editorial review, paste the same scope from each version. Comparing an entire document with only one revised paragraph creates distracting removals. Keep a separate source copy if you plan to apply the exported patch in another tool.
A useful first draft.
Keep this line.- A useful first draft.
+ A sharper second draft.
Keep this line.What the unified patch contains
The download uses before.txt and after.txt labels, context lines and unified-diff hunks. It is plain UTF-8 text, not an automatic modification of either source. Applying a patch elsewhere requires the correct original file and a compatible patch tool.
The combined comparison limit is 200,000 characters. Large edit distances are bounded, and a worker deadline prevents an unusually difficult comparison from occupying the main thread. The on-page preview caps long segments; the download contains the generated full patch.
Get a cleaner comparison
Align the versions
Compare the same excerpt or file scope so that the surrounding context is useful.
Treat whitespace deliberately
Whitespace can affect Python, Markdown, YAML and plain-text layout. Ignoring it can hide meaningful edits.
Investigate changed values
A diff identifies where to look. Validate numbers, URLs and logic using the appropriate tool before publishing.
Text Diff Checker:
questions, answered.
Can this diff checker compare source code?
Yes, as text. It highlights line changes but does not execute code, check syntax or prove that behavior is unchanged.
Why does moving a paragraph show a removal and addition?
Line diffs describe edits to a sequence. A move is often represented as deleting text from one position and inserting it elsewhere.
Does ignoring line-edge whitespace change the downloaded patch?
Yes. The comparison and patch use that setting for leading and trailing whitespace. Interior spaces still matter; keep literal comparison when indentation is significant.
Will downloading a patch modify either pasted version?
No. The download is a separate text file. Applying it is a separate operation that should use the correct original source.
The calculations and checks above describe this tool's implementation. Use these primary references for the underlying formats and publishing guidance.
jsdiff implementation ↗ (opens in a new tab)GNU unified diff format ↗ (opens in a new tab)Read the change, line by line.
Use the controls above, inspect the actual result and keep the source until you are ready to use your new copy.
Use the Text Diff Checker↑