Word & Character Counter
Words, characters, sentences and reading time, live as you type.
Text & Writing
Compare two blocks of text and see exactly which lines changed.
A diff does not compare line 1 to line 1 and line 2 to line 2. If it did, inserting a single line at the top would report every subsequent line as changed. Instead it solves for the longest common subsequence — the largest set of lines appearing in both versions in the same order — and reports everything outside that set as an insertion or a deletion.
This implementation uses Myers’ 1986 algorithm, which finds the shortest edit script in O(ND) time where N is the total input size and D is the number of differences. Because D is small for typical edits, it is effectively linear on real documents. Git, Mercurial and SVN all use variants of it.
Word-level diffing runs the same algorithm over tokens instead of lines, which is why a one-word change inside a long paragraph highlights only that word rather than flagging the whole paragraph.
Use line diff for code. Source files have meaningful line boundaries, and a line-level view maps directly onto what you would commit.
Use word diff for prose. A paragraph of text wraps to whatever width the editor uses, so line boundaries are an artifact of the container rather than the content. In a contract or an article, word diff shows you the three words a reviewer actually changed instead of a wall of red and green.
| Content | Best granularity | Why |
|---|---|---|
| Source code | Line | Lines are the unit of change and of review |
| CSV / logs | Line | One record per line |
| Contracts, articles | Word | Line breaks are reflow artifacts |
| Minified JS/CSS | Word | Everything is on one line |
| Translations | Word | Small edits inside long strings |
Yes. Drop a file onto either panel and its contents load into that side. Plain text, source code, CSV, JSON, Markdown, YAML and log files all work, because they are all text under the hood.
Binary files — Word documents, PDFs, images — will not produce a meaningful result. A .docx is a ZIP archive of compressed XML, so diffing two of them compares compressed bytes rather than sentences. Copy the visible text out of the document and paste that instead.
Because it usually is one. A tab replaced by four spaces changes the bytes even when the rendering is identical, and in Python or YAML it changes the meaning.
The tool exposes an "ignore whitespace" toggle for the cases where you do not care. With it on, leading and trailing whitespace is stripped and internal runs are collapsed to a single space before comparison. Turn it off when indentation is semantically significant.
A related trap is line endings. Text edited on Windows ends lines with CRLF; text from macOS or Linux uses LF. Paste one of each into the two panels and every line will report as changed. The tool normalizes line endings before diffing to avoid exactly this.
Yes, and this is the main reason to use it over a server-based comparison service. Diffing is where people paste the most sensitive material they handle: two drafts of an employment contract, a redlined settlement, a patch containing an API key, a redacted and unredacted report.
Every mainstream online diff tool POSTs both documents to a backend. This one does not. The algorithm is a few hundred lines of JavaScript executing in this tab, so both versions stay in your device’s memory and are discarded when you close it.
Green marks content present only in the revised version (an addition). Rose marks content present only in the original (a deletion). Unchanged lines render in the normal text color.
Not directly — .docx is a compressed archive, not text. Open both documents, select all, and paste the visible text into each panel. Word’s own Track Changes is better if you need to compare formatting as well as words.
Yes, and line granularity is the right mode for it. The output is equivalent to what git diff would report for the same two file versions.
Both panels handle several megabytes of text. Beyond roughly 50,000 lines the diff computation becomes noticeable, and word-granularity on very large inputs is slower than line-granularity by roughly the average number of words per line.
Yes. The copy button produces a unified diff — the same format git diff and patch use — which you can paste into a review comment or apply with the patch command.
Because that is what a line-based diff computes. Move detection requires a second pass that matches deleted blocks against added blocks, which Git only does with the --color-moved flag. It is a known limitation of the standard algorithm rather than a bug.
No. It compares two documents you supply. Plagiarism detection means comparing one document against a corpus of billions, which requires a server-side index.