tool hub Tool Hub

Diff Checker

Diff Checker — runs in your browser. Inputs are not stored.

Runs in your browser No sign-up Free to use


Text compare (diff)

Enter values, then press Calculate.

How to use

  1. Paste the old version in the left Original (A) and the new version in the right Compare (B).
  2. Press Compare. Common, added, and deleted lines are computed line by line.
  3. The stats above show same lines and added / deleted counts. Added and deleted are a combined total.
  4. In the result, green + is a line only in B, red - is a line only in A, and uncolored lines are shared.
  5. HTML special characters are escaped before display. Reset clears both sides and the result.
  6. Keeping original on the left and edited on the right makes green read as “new lines.” Even whitespace-only differences count as different lines.

Key concepts

Text compare (diff) aligns two documents with a line-level LCS (longest common subsequence). Shared content stays; remaining lines are deletions (red, A only) and additions (green, B only). There are no Git patch headers, word-level highlights, or moved-line detection. A single space or tab difference makes a different line, so indent-only code changes look fully rewritten.

Same-line stats are the common-line count; added/deleted is green plus red. Very long logs can slow the table, so split ranges. It fits a first-pass code review, translation proof, or config-file diff. Neither box is sent to a server. If you need character-level highlight, treat this as a draft and use an editor or Git for detail.

Example

If A is alpha / beta and B is alpha / gamma, you get 1 same line and 2 added/deleted. beta is a red deletion, gamma a green addition, alpha uncolored. Comparing two empty sides shows only an “(empty)” note. HTML tag characters are escaped so markup does not break. A single extra comment in a config file makes that whole line look changed. Matching line endings on both sides before compare reduces noise.

Related: Find and replace · Markdown preview · Character counter

Frequently asked questions

Is the text diff character-level?

It is line-level. If only a word changes inside a line, the whole line shows as a deletion plus an addition. There is no whitespace highlight.

Are lines that differ only in spaces treated as equal?

No. Different spaces, tabs, or trailing whitespace make a different line. Indent-only code can look fully changed.

How are added and deleted counts tallied?

Green lines plus red lines. Same lines are counted separately. A changed line is usually 1 deletion + 1 addition.

Can it produce a Git diff patch?

It only highlights on screen. It does not export <code>diff -u</code> headers or patch files—use Git for commits.

Can I compare very long logs?

Yes, but many lines can make LCS table work slow. Cut out the problem range.

Is the diff stored on a server?

No. Original A and compare B are matched only in the browser and are not sent or saved.

Diff Checker cover image
Your input is not sent to the server and disappears when you close the page.

Last reviewed: 2026-09-04