Diff Checker

Compare two blocks of text and see exactly what changed — added, removed, and unchanged content highlighted separately, at line, word, or character precision, in a unified or side-by-side layout. Runs entirely in your browser using a standard LCS (longest common subsequence) diff algorithm, the same family of approach tools like git diff are built on.

Layout
Diff precision

How to use

  1. Paste the original text on the left and the changed text on the right.
  2. Click Compare — added content highlights green, removed content highlights red.
  3. Pick a layout (Unified or Split) and a precision (Line, Word, or Character) to change how the result is shown.
  4. Turn on "Hide whitespace changes" to ignore lines that only differ in spacing/indentation.
  5. Copy the diff output if you need to share it.

FAQ

What's the difference between line, word, and character precision?

Line precision treats each line as one unit — a single changed word marks the whole line as changed. Word and character precision zoom in further, highlighting only the exact word or character that differs, which is more useful for comparing sentences or short strings than whole files.

What's the difference between Unified and Split layout?

Unified shows one combined view with additions and removals marked inline in sequence. Split shows the original and changed text side by side, each with its own additions/removals highlighted — often easier to scan for larger changes.

What does "Hide whitespace changes" do?

Lines (or words/characters) that differ only in whitespace — extra spaces, tabs, trailing spaces — are treated as unchanged instead of flagged as a difference. Useful when comparing code that's been reformatted but not actually changed.

What algorithm does this use?

Myers' diff algorithm — the same one git diff and GNU diff use — which finds the shortest edit script between the two inputs. It runs in a background Web Worker so comparing large text never freezes the page, and very large comparisons ask for confirmation first rather than starting silently.

Is my text uploaded anywhere?

No — the comparison runs entirely in your browser. Nothing is sent to a server.