Skip to content
K Knidox Search…
Writing · Editing

Text Diff Checker

Paste two versions of a text to see which lines were added or removed.

Try an example — tap to load
2 added1 removed
  • The quick brown fox
  • jumps over the lazy dog
  • leaps over the lazy dog
  • Pack my box with five jugs
  • Sphinx of black quartz
  • Judge my vow, ten times

Lines with were removed from the original; lines with + were added in the changed text. Unmarked lines are identical in both.

A text diff checker compares two blocks of text line by line and shows what changed. It marks lines that exist only in the changed version as added (+) and lines that exist only in the original as removed (−), leaving identical lines unmarked, then reports how many were added and removed.

What it does

Paste an original text on the left and a revised version on the right. The tool splits each block into lines and finds the longest run of lines the two versions share, so unchanged lines stay put. Anything left over is shown as a removed line (in the original but not the new text, prefixed ) or an added line (in the new text but not the original, prefixed +). A summary above the diff counts how many lines were added and removed.

How the comparison works

There is no formula — it is a deterministic procedure based on the longest common subsequence (LCS) of the two line lists. The tool builds a table of the longest sequence of lines that appears, in order, in both versions. Those matching lines are the anchors that stay unchanged; every other line is classified as added or removed by walking the table back through the two texts. Because it matches whole lines, a line that changes even slightly reads as one removal plus one addition.

  1. 1
    Paste the original. Put the first version in the Original box — for example four lines of a paragraph you are editing.
  2. 2
    Paste the changed version. Put the revised text in the Changed box. Keep line breaks where they are, since the comparison works line by line.
  3. 3
    Read the marked lines. Lines prefixed − were in the original but dropped; lines prefixed + are new. Unmarked lines are identical in both versions.
  4. 4
    Check the counts. The summary shows totals, e.g. “2 added, 1 removed”. A single reworded line shows as 1 removed and 1 added.
  5. 5
    Copy the result. Use Copy diff to grab the whole comparison as plain text with + and − prefixes, ready to paste into notes or a message.

What the markers mean

How each line in the diff is labelled.

MarkerMeaningWhere the line appears
(none)UnchangedIdentical line, present in both versions
+AddedIn the changed text only — new since the original
RemovedIn the original only — dropped in the changed text

Line-level vs word-level

This is a line-level diff: it compares whole lines, so changing one word marks the entire line as removed and re-added rather than highlighting just the edited word. That keeps the output easy to scan for structural edits — added paragraphs, deleted sentences, reordered list items — and is the same model version-control tools use. A word-level diff would instead highlight the exact characters that changed within a line; for prose where you tweak wording inside long sentences, that can be more precise. Use this tool to spot which lines moved, appeared, or vanished; read the two versions side by side when you need to see a within-line wording change. It is handy for comparing drafts, spotting copy-paste changes, checking edits to config files or code snippets, and confirming what a collaborator altered.

Is this a line-level or word-level diff?
It is line-level: whole lines are compared, so changing a single word inside a line shows that line as one removed line plus one added line rather than highlighting the individual word.
Does it detect moved lines?
No. A line moved to a new position is shown as a removal where it used to be and an addition where it now sits, because the comparison preserves order rather than tracking relocation.
How does it decide what counts as a line?
Each text is split on line breaks, so every newline starts a new line. Reflowing a paragraph or adding a line break changes which lines match and will show up in the diff.
Why does one small edit show as both an added and a removed line?
Because the comparison matches whole lines. If any character on a line differs, the old line no longer matches, so it is reported as removed and the new line as added.
Is the comparison case-sensitive and space-sensitive?
Yes. Lines must match exactly to count as unchanged, so differences in capitalisation, spacing, or trailing whitespace will register as changes.
What do the added and removed counts mean?
Added is the number of lines that appear only in the changed text; removed is the number that appear only in the original. Unchanged lines are not counted in either total.