How the comparison works
The tool cuts both texts into small pieces: whole lines, single words, or single characters, depending on the mode you pick. It then looks for the longest sequence of pieces that both versions share, in the same order. Everything outside that shared sequence is a change. A piece that exists only in the original was removed. A piece that exists only in the new version was added.
The search uses the Myers diff algorithm (published by Eugene Myers in 1986), the same idea behind git diff. It finds the smallest set of additions and removals that turns the first text into the second. Because nothing is guessed, the counts always add up:
unchanged + added = pieces in the changed text
A “changed” line is simply a removed line and an added line shown next to each other. Inside such a pair, the tool runs a second, word-level comparison, so you can see exactly which words differ instead of re-reading the whole line.
Worked example: words versus characters
Original: The quick brown fox jumps over the lazy dog. Changed: The quick red fox jumped over the lazy dog.
In Words mode the result is +2 added, −2 removed, 8 unchanged words. “brown” became “red” and “jumps” became “jumped”. The full stop counts as its own word, which is why there are 8 unchanged words, not 7.
In Characters mode the same pair gives +4 added, −5 removed, 39 unchanged characters. The tool keeps the “r” of “brown” because “red” also contains an “r”, and it keeps “jump” because only the ending changed. Character mode is precise, but for whole-word edits it can look busy. That is why Words is usually the better choice for prose.
Worked example: a list in Lines mode
Suppose a shopping list changes from apples, bread, milk, eggs (one item per line) to apples, brown bread, milk, butter, eggs. Lines mode reports +2 added, −1 removed, 3 unchanged lines: “bread” was replaced by “brown bread”, and “butter” is new. The downloadable .diff file for this change looks like this:
--- original.txt
+++ changed.txt
@@ -1,4 +1,5 @@
apples
-bread
+brown bread
milk
+butter
eggs
Lines starting with a space are unchanged context, - means removed and + means added. The @@ line says the change starts at line 1 and covers 4 lines of the old text and 5 lines of the new one.
Which mode should you use?
| Mode | Best for | Typical change it reveals |
|---|---|---|
| Lines | Code, CSV files, settings, lists | A line added to a config file |
| Words | Essays, contracts, articles, emails | “may” changed to “must” in a clause |
| Characters | Typos, IDs, short strings, hidden symbols | “recieve” corrected to “receive” |
What the ignore options do
- Ignore case treats “Hello” and “hello” as the same in every mode.
- Ignore whitespace depends on the mode. In Lines mode it ignores spaces at the start and end of a line and treats a run of spaces or tabs as one space. In Words mode, extra spaces and line breaks between words never count. In Characters mode, any run of spaces, tabs and line breaks counts as a single space.
The ignore options only change what is highlighted. The .diff file you copy or download always describes the exact texts, so it can be applied with git apply or patch without surprises.
Windows (CRLF) and Mac or Linux (LF) line endings are always treated as the same, so a file saved on a different computer does not show every line as changed.
Reading the result
Side by side puts the original on the left and the new version on the right, with line numbers on both sides. Unified shows one column, like a patch: removed lines first, then the lines that replaced them. On a phone the unified view is used by default because it fits a narrow screen.
Turn on Show only changes for long documents. Long stretches of unchanged text shrink to a single bar, and 3 lines of context stay around each change, just like in a code review. Click a bar to open it again.
Tips for cleaner comparisons
- Comparing JSON? Run both versions through the JSON formatter first, with the same indentation and with keys sorted. Then only real changes remain, not formatting noise.
- Text copied from Word or a PDF often hides curly quotes (’ instead of ’) or non-breaking spaces. If two lines look the same but are marked as different, switch to Characters mode to find the culprit.
- Only need to know if two files are identical? Compare their checksums with the hash generator. The same SHA-256 hash means the same content.
- Checking a rewrite against a length limit? Paste the new version into the word counter.
Privacy
The comparison runs entirely in your browser, inside a background worker, so typing stays smooth even with very long texts. Nothing you paste is uploaded, logged or stored. Only your display settings (mode and options) are remembered in this browser.