Diff Compare
Compare two versions of a text and see which lines changed.
How to compare two texts
- Paste the original version into the left panel and the modified version into the right panel.
- The comparison runs automatically as you type and updates in real time.
- Look for rows marked as added, removed, or unchanged in the result area.
- Use the counters to see how many lines changed and copy the result when you finish.
- Paste clean, similarly formatted texts so line numbers point to meaningful changes.
When it helps
- Reviewing changes between two versions of a document or config file.
- Spotting accidental deletions or additions in source code.
- Comparing draft revisions before you share or publish them.
- Confirming that an edited text matches the intended changes.
- Comparing two versions of a translation or a written contract.
How text changes become patches
The comparison uses the bundled jsdiff library after replacing Windows CRLF endings with LF. The on-screen comparison ignores a missing final newline, so a last line without one still matches; the copied unified patch keeps that detail. Ignore whitespace treats leading and trailing spaces as insignificant, and Ignore letter case treats upper and lower case as equal. The unified patch carries original and updated headers plus numbered change blocks, and uses the same whitespace option as the display. Typing triggers a refresh after a 200-millisecond pause.
Example: replacing the middle line
Put oak, maple and pine on separate lines in Original, and oak, beech and pine in Updated. End both texts with a newline, choose Unified view and leave Ignore whitespace unchecked. The counters show 1 added, 1 removed and 2 unchanged. Copy as unified diff produces a block headed @@ -1,3 +1,3 @@, with -maple and +beech between the unchanged surrounding lines.
Frequently asked questions
Is the text I paste kept private?
Yes. Both texts are compared only in your browser and are never uploaded. The page has no server storage or tracking.
What are the limitations?
The tool compares line by line. An edited line is shown on one row with the changed words highlighted; the highlight is skipped for lines over 2,000 characters. Inputs are limited to 1 MB each, and very large ones may slow down your browser.
Does it update automatically?
Yes. The comparison refreshes as you type in either panel, so you can see the result without pressing a button.
What do the numbers mean?
The counters show how many lines were added, how many were removed, and how many stayed the same between the two texts.
Can I copy the comparison?
Yes. The copy button places the visible result on your clipboard so you can paste it into a note or report.
Why does one edit show as two lines?
A line-based diff treats an edited line as the old line removed and the new line added. In side-by-side view the two versions share one row and the changed words are highlighted. The unified view and the copied patch still list the old and new line separately, as every diff tool does.