Diff Checker

Compare two blocks of text and see exactly what was added, removed and unchanged, line by line. Everything runs in your browser — your data is never sent anywhere and nothing is stored.

How to use the diff checker

  1. Paste your first version into Original and your second version into Changed.
  2. Click Compare to run the comparison line by line.
  3. Read the unified result: lines with a red background and a leading - were removed, lines with a green background and a leading + were added, and plain lines are unchanged.

The comparison uses a longest common subsequence (LCS) algorithm, so it keeps the largest block of matching lines aligned instead of comparing position by position. That means inserting or deleting a line does not knock every following line out of sync.

More PAYATE tools

Frequently asked questions

What is a diff?

A diff (short for “difference”) is a comparison of two versions of text that shows exactly what changed between them — which lines were added, which were removed, and which stayed the same. Diffs are what let you review edits to a document or changes to source code at a glance.

Is the comparison line-based?

Yes. This tool compares your two texts line by line. It uses a longest common subsequence (LCS) algorithm to find the largest set of lines that appear, in order, in both versions — those are shown as unchanged, and everything else is marked as added or removed.

Is my data sent anywhere?

No. The comparison runs entirely in your browser — your two texts are never uploaded to a server and nothing is stored. It is safe for private notes, drafts or code you would not want to transmit.

Does it compare word by word or character by character?

No — the comparison is line-based. A line either matches a line in the other text exactly or it does not. If you change a single word, the whole line it lives on is shown as removed (old version) and added (new version).

Can I compare code?

Yes. A line-based diff works well for source code, configuration files, JSON, CSV and any other plain text. HTML characters such as &, < and > are escaped so your code is displayed exactly as written and never runs.

Why is a whole line marked changed when I only edited part of it?

Because the diff works at the line level, any change within a line makes it no longer match the original line. The tool therefore shows the original line as removed (-) and the edited line as added (+), rather than highlighting the specific words that differ.