Diff Checker
Compare two texts line by line and see exactly what was added, removed and left alone.
Loading tool…
Both texts are compared in your browser and neither is uploaded — which matters here, since the things people compare are often contracts, configuration files or code they would rather not paste into someone else's server.
What the Diff Checker does
The diff checker on this page will compare two texts line by line and see exactly what was added, removed and left alone. Everything runs inside this page, so the work happens on your own device rather than on a server. It is most often used for seeing what changed between two versions of a document or a contract. More utilities in this area are collected on FreeToolsWorld.org.
How to use it
- Paste the original on the left and the changed version on the right.
- The comparison runs as you type.
- Use the ignore options when whitespace or case changes are noise rather than signal.
- Copy the result as a unified diff if you need it for a patch or a ticket.
How it works
The comparison uses a longest-common-subsequence algorithm rather than comparing line one against line one, line two against line two. The difference is the whole value of the tool: inserting a single line at the top of a file makes a positional comparison report every subsequent line as changed, which tells you nothing. LCS finds the lines that genuinely correspond and reports only the real insertions and deletions.
This is the same approach `diff` and version control systems use, and the output converts directly to the unified diff format that patch tools and code review systems read. The copy button produces that format, with the familiar `-` and `+` prefixes and a context line for everything unchanged.
The ignore options exist because not every difference is a difference you care about. Trailing whitespace changes when a file passes through an editor with different settings; case changes matter in some contexts and not others. Turning those off lets you see the substantive changes without the noise, and the summary tells you when the texts are identical under the options you chose rather than identical outright.
The comparison is bounded, because the algorithm builds a table proportional to the product of the two line counts — a pair of two-thousand-line files is four million cells, which is near the practical limit in a browser tab. Beyond that the page says so rather than freezing, and the answer is to compare the relevant sections rather than whole files.
When to use it
- Seeing what changed between two versions of a document or a contract.
- Comparing two configuration files to find the difference that matters.
- Checking what an editor or a tool changed in a file.
- Producing a unified diff for a ticket or a code review.
Common mistakes to avoid
- Comparing very large files in a browser. The comparison grows with the product of the line counts.
- Leaving whitespace sensitivity on when the files came from different editors, which buries the real changes.
- Expecting word-level highlighting within a line. This compares whole lines, like standard diff tools.
Frequently asked questions
How does this differ from comparing line by line?
It uses a longest-common-subsequence algorithm, so inserting one line at the top reports as one insertion rather than marking every line below it as changed. That is the same approach diff and version control use.
Are my texts uploaded?
No. Everything is compared in your browser. That matters here more than on most pages, because the things people compare tend to be contracts, configuration or code they would rather not paste into a stranger's server.
Can I get a unified diff?
Yes — the copy button produces standard unified diff format with the usual minus and plus prefixes, which patch tools and code review systems accept directly.