Lines, words or characters
The level you pick decides what counts as one piece of text, and so what can be reported as changed.
- Lines is the classic diff, the one used for source code, configuration files, CSV exports and lists. A line is either the same or it is not. When a removed line and an added line sit side by side, the words that differ are marked inside them, so you can see that only a date changed and not the whole line.
- Words suits prose. A word is a run of letters, so
don'tis one word, and3.14is one number. Each punctuation mark is its own piece, and spaces are compared but not counted. - Characters finds a single typo in a name, an ID or a short string. It compares one visible character at a time, so an accented letter or an emoji counts once.
How the comparison works
The tool looks for the longest sequence of pieces that both texts share, in the same order. Everything outside that sequence is a removal (it is only in the original) or an addition (it is only in the changed text). This is the shortest edit script of Eugene Myers' 1986 algorithm, the same idea behind diff and Git.
Because only order matters, a paragraph that has been moved shows up as removed in one place and added in another. The tool does not try to detect moves. When two different edit scripts are equally short, either one is correct, and you may see a different one than another tool shows.
Ignoring whitespace and case
Ignore whitespace treats any run of spaces, tabs and line breaks as one space. In lines mode, each line is trimmed and its inner runs of spaces are collapsed before it is compared, which hides re-indentation and trailing spaces. In words and characters mode, a run of whitespace is one piece, so a b and a b match, and so do a b and a line break between a and b.
Ignore case compares everything in lower case. In both options the text you see is still the original text, only the comparison is relaxed.
Reading the counts and the patch
Added and removed are counts of pieces at the level you chose: lines, words or characters. Similarity is twice the number of shared pieces divided by the number of pieces in both texts together, so identical texts score 100% and texts with nothing in common score 0%.
In lines mode you can copy the result as a unified diff. It starts with --- original and +++ changed, then lists each change with three lines of context in @@ blocks. In words and characters mode the copy uses the markers [-removed-] and {+added+} inside the running text.