Home / Tools / Diff checker
Free tool · nothing uploaded

Diff Checker

Paste two versions of a text or a file and see exactly what changed: added lines in green, removed lines struck through, with line numbers from both sides. It runs entirely in your browser — your text never leaves your machine and never reaches a server.

Result

Comparison is line by line. The number on the left is the line number — from the original for removed and unchanged lines, from the changed text for added ones.

How this diff checker works

The tool splits both inputs into lines and finds the longest common subsequence between them — the longest run of lines, not necessarily adjacent, that appears in both in the same order. Anything outside that subsequence is a real change: present only in the original means removed, present only in the changed text means added.

That matters because it is what makes a diff readable. A naive comparison that walks both files line by line in lockstep reports every line after an inserted one as changed. An LCS diff recognises the insertion and leaves the rest aligned, which is the same approach git diff and other standard diff tools take.

The options

  • Ignore case — treats Value and value as the same line. Useful for prose and for case-insensitive config keys.
  • Ignore whitespace — trims each line and collapses runs of spaces and tabs into one. This is the option you want when a reformat or an indentation change has made every line look different.
  • Only show changes — hides unchanged lines so a small change in a large file is easy to find.

What people use it for

  • Reviewing a change before committing it — paste the old and new version of a function and confirm only what you intended moved.
  • Comparing config files between two environments, where one setting differs and the files are otherwise identical.
  • Checking what an AI model changed in a block of code it rewrote, when you want to read the edit rather than trust it.
  • Finding the edit in two versions of a document — contract text, release notes, documentation.
  • Verifying a copy-paste actually matched, including trailing whitespace differences that are invisible on screen.

Why this runs in your browser. Most online diff tools post both texts to a server to compare them. That is a poor trade for anything from a private repository, a config file with hostnames in it, or an unreleased document. This page does the comparison in JavaScript on your own machine. You can confirm that: open your browser's network tab, paste text, and watch — no request is made.

Frequently asked questions

Is my text uploaded anywhere?

No. The comparison runs in JavaScript in your browser. Nothing is sent to a server, nothing is stored, and no account is needed. Once the page has loaded you can disconnect from the network and it still works.

Can it compare two files rather than pasted text?

Not in this version — paste the contents into the two boxes. For files on disk, git diff --no-index fileA fileB does the same job in a terminal, and Catalase shows file diffs in a visual diff viewer.

Does it diff word by word inside a line?

No, this tool compares whole lines. A line with a one-character change is reported as one removal plus one addition. For prose where you want word-level detail, split sentences onto their own lines first.

Is there a size limit?

There is no hard limit, but the comparison builds a table proportional to the two line counts multiplied together, so very large inputs — tens of thousands of lines on both sides — will be slow in a browser. For files that big, use git diff or diff locally.

Why do two lines that look identical show as changed?

Almost always trailing whitespace, a tab where the other side has spaces, or different line endings. Tick Ignore whitespace to confirm — if the difference disappears, that was it.

Diffs you can read without leaving your editor

This page exists because comparing two blocks of text shouldn't require uploading them. Catalase applies the same principle to AI coding: it is a free, open-source code editor that runs language models on your own machine through Ollama, shows every git change in a real diff viewer, and asks for no account. When an agent edits a file, you see the diff and approve or undo it.

Download Catalase freeWhat is Catalase?

Related tools