Text Compare & Diff Checker

Compare two blocks of text or code and see exactly what changed, line by line.

Compare two blocks of text or code and see exactly what changed — added lines in green, removed lines in red, everything else untouched. View the result side by side or as a unified diff, and optionally ignore case or whitespace. Everything runs in your browser, so contracts, drafts and proprietary code stay on your device.

View

How Text Compare & Diff Checker works

A diff is not simply a line-by-line comparison — that would fall apart the moment a single line is inserted, marking everything after it as changed. What you actually want is the longest common subsequence: the largest set of lines appearing in both versions in the same order. Everything in that set is unchanged; everything else was added or removed. This is the algorithm behind `git diff` and every serious comparison tool, and it is what runs here.

The result is that inserting one line at the top of a thousand-line file produces exactly one change, not a thousand. That property is what makes a diff useful for review.

The two views serve different purposes. Side by side keeps the original and the changed version in their own columns with line numbers, which is easier when you are comparing whole documents or want the surrounding context. Unified interleaves them with `+` and `−` markers, which is the format you already know from pull requests and patch files, and it is more compact for scattered small edits.

The two ignore options exist because not every difference is meaningful. Ignoring whitespace collapses runs of spaces and trims line ends, which strips out the noise from a reformat or a change of editor settings so you can see the real edits underneath. Ignoring case is useful for comparing lists of names, identifiers or config keys where capitalisation has drifted. Both options affect only the comparison — the text shown is always exactly what you pasted.

The comparison is capped at 3,000 lines per side. The algorithm builds a table proportional to the two lengths multiplied together, so beyond that point a browser tab would become unresponsive; the tool tells you rather than freezing.

Everything runs locally in JavaScript, which makes it appropriate for comparing contract drafts, unreleased copy, or source code you cannot paste into a hosted service.

How to use Text Compare & Diff Checker

1

Paste both versions

Put the original on the left and the changed version on the right.

2

Choose how to compare

Switch between side-by-side and unified views, and optionally ignore case or whitespace differences.

3

Read the result

A summary counts added, removed and unchanged lines, with every change highlighted line by line.

Frequently Asked Questions

Is my text uploaded anywhere?
+
No. The comparison runs entirely in your browser, so it is safe for contract drafts, unpublished writing and proprietary source code.
What is the difference between the two views?
+
Side by side keeps each version in its own column with line numbers, which suits whole-document review. Unified interleaves changes with + and − markers, the format used by pull requests and patch files.
How does it decide what changed?
+
It computes the longest common subsequence of lines — the same approach git uses. That way, inserting one line marks one change rather than treating everything after it as different.
Can it compare Word documents or PDFs?
+
Not directly — paste the text in. To extract text first, use our PDF to Markdown or Word to Markdown tools, then compare the results here.
What does "ignore whitespace" actually do?
+
It collapses repeated spaces and trims line ends before comparing, so a reformat or a change of indentation settings does not drown out the real edits. The displayed text is unchanged.
Is there a size limit?
+
Yes — 3,000 lines per side. The algorithm's memory use grows with the two lengths multiplied together, so beyond that the page would become unresponsive. You are told rather than left waiting.
Does it highlight changes within a line?
+
No — comparison is line by line, so a line with a single altered word shows as one removal plus one addition. Placing the two versions side by side usually makes the difference obvious.
Is the diff checker free?
+
Yes, completely — no sign-up, no watermark, no limits.

Related tools