Skip to content

Code tool

Diff Checker

Paste two versions of a text or code file to compare them and see which lines were added and which were removed.

Runs entirely in your browser. Nothing you paste is uploaded.

Paste the original and the changed version to compare them.

Diff Checker by YegappanFree tool. Open the full page for the guide.

How to use the Diff Checker

  1. Paste the original on the left and the changed version on the right.
  2. Select Compare. Removed lines are marked with a minus sign and added lines with a plus.
  3. Use the options to ignore whitespace or case, then copy or download the result as a standard .diff file.

How to read the text comparison

A diff checker is a text compare tool: it takes two versions of a text and highlights the difference between them. Use this online diff checker to compare text, code, configuration files or two drafts of a document.

The checker finds the smallest set of line changes that turns the first text into the second, the same approach Git uses. Lines that only exist in the original are shown as removed, lines that only exist in the new version as added, and unchanged lines are folded away so the changes stand out.

Every change is marked with a plus or minus sign as well as colour, and both versions keep their own line numbers so you can find the spot in your editor.

Ignore whitespace changes treats lines as equal when they differ only in indentation or spacing, which is useful after reformatting. The exported unified diff can be applied with git apply or patch.

Common questions

How do I compare two text files online?

Paste the original text in the first box and the changed text in the second. Added lines are marked with a plus sign and removed lines with a minus sign.

Does it work for plain text as well as code?

Yes. It compares any text line by line: code, configuration files, articles or CSV data.

What is a unified diff?

It is the standard patch format used by Git and the patch command, with lines prefixed by + and - and a few lines of context around each change.

Why is a whole block shown as removed and added?

When two versions share very few lines, an exact comparison is not meaningful, so the changed region is shown as one block.

Is my code sent to a server?

No. The comparison runs in your browser and nothing is uploaded.

Guides for the Diff Checker

Related tools