Skip to content

Diff Checker: Compare Two Texts Line by Line

Runs 100% in your browser — your text never leaves this page, and nothing is uploaded or stored.

This diff checker compares two texts line by line and shows exactly what changed — added lines in green, removed lines in red — free, in your browser. Paste an original and an edited version to compare two texts online and check what changed between versions — added lines in green, removed lines in red, with a count of each.

How to use the Diff Checker

  1. Paste the original version into box A (Original text) and the changed version into box B (New text). Two samples are pre-filled, so you can study a finished comparison before pasting anything of your own.
  2. Press Compare now — or simply start typing, because the comparison refreshes automatically whenever either box changes.
  3. Read the result from top to bottom: lines marked + in green exist only in version B, lines marked − in red exist only in version A, and unmarked lines are identical in both.
  4. Check the summary line for the totals — how many lines were added, how many removed, and how many left unchanged.
  5. Fix a typo in either box and watch the highlights update instantly; that makes it easy to iterate until two drafts agree. Clear empties both boxes when you are done.

About this tool

Whether you are reviewing a revised contract, checking what a client changed in a draft, or comparing two versions of a web page, reading two documents side by side and hunting for differences is slow and error-prone. This diff tool compares your texts line by line and highlights every change, with a summary of added, removed and unchanged lines. The comparison runs entirely in your browser, which makes it safe for sensitive documents — contracts, unpublished manuscripts and private correspondence are never uploaded anywhere. A diff earns its keep at the moments when two versions of the "same" text quietly diverge: a client returns a contract with one clause reworded, a colleague edits an article after you proofread it, a config file changes between backups, or a terms page is updated and you want to know exactly how. Reading both versions in full and hoping to spot the change is how mistakes slip through; a line-by-line comparison turns an hour of squinting into a ten-second scan of green and red. Because the comparison is line-based, this diff checker suits prose, lists, data exports and code alike — anywhere a line is a natural unit. A changed word marks its whole line, which keeps the output readable; if you need to find where inside a long line the change sits, split the text into shorter lines first — a paragraph per line, or even a sentence per line — and compare again.

Worked example

The tool arrives with two versions of a short meeting note already loaded. Version B moves the meeting, drops the lunch line and adds parking details: Version A (original)
The meeting is scheduled for Monday at 10 AM.
Please bring the quarterly sales report.
Lunch will be provided for all attendees.
The venue is the main conference hall.
Version B (new)
The meeting is scheduled for Tuesday at 11 AM.
Please bring the quarterly sales report.
The venue is the main conference hall.
Parking is available in the basement.
What the checker reports
2 lines added · 2 lines removed · 2 lines unchanged
The changed first line appears twice — in red as it was ("Monday at 10 AM") and in green as it is now ("Tuesday at 11 AM") — because the comparison works whole line by whole line. The lunch line shows only in red (it was deleted), the parking line only in green (it was added), and the two untouched lines are listed without colour.

Features

  • A true line-by-line comparison using a longest-common-subsequence algorithm — the same approach professional diff tools use — so lines are matched intelligently, not just compared by position.
  • A clear colour language: green with a + for additions, red with a − for removals, and plain text for unchanged lines, readable at a glance on long documents.
  • A live summary counts added, removed and unchanged lines after every comparison.
  • It compares as you type — edit either version and the highlights refresh automatically — with a Compare now button to re-run it on demand.
  • Room to work: documents of a few thousand lines are handled comfortably, up to about 6,000 lines across both versions.
  • Completely private: both texts are compared in your browser and never uploaded, which makes it safe for contracts, manuscripts and correspondence.

Diff Checker FAQs

How are the two texts compared?The tool compares them line by line using a longest-common-subsequence algorithm — the same approach professional diff tools use. Lines only in the second text are additions; lines only in the first are removals.
What if only one word changed in a long line?The whole line is highlighted, because the comparison is line-based — that keeps results readable. The summary counts still show exactly how many lines changed.
Why does a changed line appear twice?Because it exists in two forms: the version A form is shown in red as a removal and the version B form in green as an addition, in the right position in the flow of the text. Two entries for one edited line is the normal way a line diff reports a change.
Can I compare very long documents?You can compare documents of a few thousand lines comfortably; the checker accepts up to about 6,000 lines across both boxes. For anything longer, split the document into sections and compare a part at a time — the results stay readable that way too.
Does the order of lines matter?Yes. The comparison respects order, the way professional diff tools do. A paragraph moved to a new position shows as a removal where it was and an addition where it went, even though its words never changed.
What counts as one line?Everything between two line breaks. A long paragraph that wraps across three lines on screen but contains no line breaks is a single line here — press Enter at the points where you want the comparison to split.
Are the texts I compare kept private?Yes. Both texts are processed locally in your browser and are never sent to a server.
More text analyzer tools →