HCODX/Text Diff Checker
100% browser-based · Line-by-line · LCS algorithm

Text Diff Checker

Compare two text blocks side by side in your browser. Line-based diff highlighted with + additions and - deletions. Uses an LCS (longest common subsequence) algorithm.

Before
After
Diff options
Try code diff
Diff result
Left size
0 B
Right size
0 B
Changes
0
Status
Ready
Example

Two texts, one diff

Identical lines pass through unchanged. Lines unique to the left side are removed (-); lines unique to the right side are added (+).

Before
The quick brown fox
jumps over the lazy dog
The end.
Diff
- The quick brown fox
+ The quick red fox
- jumps over the lazy dog
+ jumps over the lazy cat
  The end.
+ P.S. addendum.
Use cases

What you'll use this for

Anywhere two text blobs need to be compared without firing up diff on the terminal.

Contract review

Spot every clause that changed between two drafts of a legal document.

Version compare

Pre-commit sanity check — paste two versions and see exactly what shifted.

Copy editing

Show authors the precise edits applied to their drafts, line by line.

Log comparison

Compare two log outputs to find a regression or environment drift.

Step by step

How to diff two texts

1

Paste before

Drop the original text into the left editor. Up to ~1 MB feels responsive.

2

Paste after

Drop the modified text into the right editor — or click Swap to flip sides.

3

Read the diff

Auto-compare keeps the diff fresh as you type. Lines prefixed - were removed, + were added.

4

Copy or download

Save as diff.txt or copy the unified-style output to your clipboard.

FAQ

Frequently asked questions

Line-by-line LCS (longest common subsequence). It finds the longest sequence of unchanged lines, marking the rest as additions or deletions — the same approach used by classic Unix diff.

Yes. Two lines that differ only in case are reported as a change. If you need case-insensitive comparison, run both inputs through a text cleaner first.

Yes. Completely free, no signup, no limits. Both texts stay in your browser.

Works comfortably for files under ~1 MB. The LCS table grows as O(m × n) in lines, so very large or wildly different inputs slow down. Truncate or split first if needed.

Click the swap arrows in the After header — it flips the two sides and re-runs the diff so + and - swap roles.

About

About line-based text diffing

A text diff is the smallest set of edits that transforms one text into another. The LCS approach finds the longest sequence of lines present in both inputs in the same order — everything outside that sequence is an insertion or deletion.

Output format

  • line — unchanged context line.
  • - line — line removed from the right side.
  • + line — line added on the right side.

When to use this vs other diffs

  • Text diff — prose, logs, plain configs.
  • Code diff — when you want language-aware syntax highlighting.
  • JSON / XML / YAML diff — when whitespace or key order shouldn't count as a change.
Related

Related tools