How to read a text diff
Paste the old text on the left, the new text on the right, and press Compare. The tool splits both texts into pieces, matches the shared ones, and marks the rest as removed or added. In line mode a minus marks a removed line, a plus an added line, and an unmarked line exists in both texts. In word mode removed pieces are struck through and added pieces underlined. Colour never carries the meaning alone.
The counters show removed, added and unchanged units: lines in line mode, words, numbers or punctuation marks in word mode.
Line mode and word mode
Line mode matches the versions line by line and suits configuration files, logs and lists; one changed letter marks the whole line. Word mode finds small corrections in running prose.
In word mode, runs of letters, digits and underscores count as words; every punctuation mark or symbol and every whitespace run is its own piece. Because the apostrophe is separate, Türkiye'nin splits into Türkiye, the apostrophe and nin. This makes no linguistic claim about word boundaries. Emoji sequences and combining marks stay together as grapheme clusters.
The whitespace option and line endings
The ignore whitespace option changes only the comparison key; your text is never modified. When on, runs of spaces, tabs and line breaks count as equal and whitespace at line edges is ignored. When off, two spaces and one space differ. Even when on, a joined versus split word, or an added empty line, remains a difference. A pure whitespace difference is reported separately.
The line-ending contract is explicit: CRLF and a lone CR are read as LF before comparing, so Windows and Unix files show no difference. The line break ending the last line belongs to that line; with the option off, a text that ends with a line break and one that does not differ on the last line.
Turkish letters, emoji and Unicode
The tool never converts letters silently. İstanbul and istanbul, or ışık and isik, are different words; case, the dotted and dotless i, and accents are preserved. Texts are not Unicode-normalised: ü as one character and u plus a combining diaeresis are different sequences, and the tool warns you when a difference comes only from that spelling form. For the causes, read The Turkish İ problem.
Limits and the reasons for them
The comparison runs on the main thread, so input is limited up front. The values are product design, not market data.
| Limit | Value | Reason |
|---|---|---|
| Text size | 50 KiB each (UTF-8) | Protects memory |
| Line mode | 2000 lines per text | One piece per line |
| Word mode | 5000 words or symbols per text | Whitespace not counted |
| Work budget | 1 million steps | No unbounded quadratic time |
| Shown sections | 10000 | Truncation is labelled |
The algorithm is Myers' O(ND) method, where D is the size of the smallest edit script. Common beginning and end are removed, steps are counted, and the budget is checked before memory is allocated. If it is exceeded, the tool asks for a smaller piece instead of guessing. Texts with nothing in common count as fully changed at once; many shared but reordered lines can exceed the budget, so split the document.
Privacy and the share link
The texts are processed only in this page's memory. The tool makes no network request and writes nothing to browser storage or logs. The share button adds only the options, the mode and the whitespace setting; the texts never enter the link and are not restored for whoever opens it. On a shared computer, press Clear when done.
What this tool does not do
- It does not compare JSON semantically; use the JSON Diff tool for that.
- It produces no plagiarism or originality score and no similarity percentage.
- It does not patch files or perform three-way merges.
- It treats synonyms and rewritten sentences as different.
- For counts see the Word Counter; for letter case see the Case Converter.
Sources and last check
The method is based on Eugene W. Myers' paper An O(ND) Difference Algorithm and Its Variations (Algorithmica, volume 1, 1986, pages 251–266). The grapheme-cluster grouping relies on the segmentation described in the MDN Intl.Segmenter documentation. The sources were last checked on 25 October 2026.
Frequently asked questions
What is the difference between line mode and word mode?
Line mode treats each line as one piece, so one changed letter marks the whole line. Word mode treats words, punctuation and whitespace separately. Use line mode for configuration and logs, word mode for prose.
Does ignoring whitespace change my text?
No. The option only decides whether two pieces count as equal. The text shown and copied is exactly what you typed.
Do my texts end up in the share link?
No. The link carries only the mode and the whitespace setting. The texts are never written to the link, address bar, browser storage or a server.
Why am I asked to enter a smaller piece?
The diff calculation cannot grow without limit. Large texts that differ a lot but share some lines can exceed the step budget. The tool reports this instead of inventing an approximate result; split the text into sections.
Do Windows and Linux line endings make a difference?
No. CRLF and a lone CR are read as LF before comparing, and a warning says so. Only whether the last line ends with a line break shows as a difference.
Can I compare code or JSON?
Yes, as plain text. To compare JSON values semantically, use the JSON Diff tool, which ignores textual differences such as key order.