text tool
Text diff
Paste the version you started with on the left and the new one on the right. The comparison underneath is the point of the page: every line is numbered, additions carry a plus and removals a minus, and inside a rewritten line the exact words that moved are highlighted. Long stretches of untouched text collapse out of the way so you only read what changed.
Runs on your device. Nothing is uploaded.
Loading the tool…
How to use it
- 1
Paste both versions
Original on the left, changed on the right. The comparison appears as soon as either box has something in it and redraws on every keystroke.
- 2
Read the summary line
It gives added, removed and rewritten line counts, how much of the text is the same, and whether any block simply moved.
- 3
Step through the changes
Previous and Next jump from one change to the next and outline it, so you never have to hunt through a long file.
- 4
Switch the view to suit the screen
Side by side on a wide screen, one column on a phone. One column also matches the format Git and code review tools use.
- 5
Copy the result as a patch
The patch is in standard unified format, with three lines of context around each change, so it pastes straight into a ticket or a code review.
How the comparison is worked out
The shared beginning and end of the two versions are matched first, so only the part that actually moved is compared properly. That middle section goes through the Myers difference algorithm, which finds the shortest set of insertions and deletions that turns one list into the other. It runs first over lines, then again inside any pair of lines that are similar enough to be a rewrite rather than a replacement, this time over words or characters. When the middle section is so large that a precise answer would stall the page, the tool says so in the summary line and shows the section as one block replacement instead of guessing.
Colour is never the only signal
Added lines carry a plus, removed lines carry a minus, and both have a coloured bar down the left edge as well as a tinted background. Inside a rewritten line, inserted words are underlined and deleted words are struck through. That means the whole comparison still reads correctly in black and white, on a projector, or for the roughly one in twelve men who cannot reliably separate red from green. It is the same approach the accessibility guidelines ask for and the same one code review tools settled on.
Word level and character level are different tools
Word level is the right default for prose. It marks whole words as inserted or deleted, which is how a person reads a change to a sentence. Character level is better for identifiers, reference numbers and prices, where one digit has changed inside a token and word level would just tell you the whole token is different. Switch between them in the advanced options.
Nothing is uploaded, and you can check
The comparison runs in JavaScript in this page. After the page loads it makes no network request, which you can confirm in your browser's network tab: type into either box and watch nothing happen. That matters here more than on most tools, because the two things people most often compare are contract drafts and configuration files.
Limits
- It compares plain text. Paste from a document and you lose the formatting, so a styling only change looks like no change at all.
- Very large or very different inputs fall back to showing the middle section as one block replacement rather than a precise edit script, and the summary line says so when that happens.
- Moved blocks are detected only when a run of lines is identical in both versions, so a block that moved and was also edited shows as a removal plus an addition.
- Ignoring spacing compares lines with runs of whitespace flattened, which also hides indentation changes.
What it does not do
- It does not merge the two versions or let you accept individual changes.
- It does not read a Word file, a PDF or a folder; paste the text instead.
- It does not do syntax highlighting for code.
- It does not keep either version unless you tick the box in the advanced options.
Questions people ask
Is my text uploaded anywhere?
No. The comparison runs in your browser and the page makes no network request after it loads. You can verify that in the network tab of your browser's developer tools: paste into either box and nothing is sent. Nothing is stored either, unless you tick the box in the advanced options that keeps both versions on this device.
What algorithm does it use?
Myers difference, the same family of algorithm behind Git and most code review tools. It finds the shortest sequence of insertions and deletions that turns the first version into the second. Matching prefixes and suffixes are stripped first so the expensive part only sees the section that genuinely moved, which keeps ordinary edits instant.
Why does one line show as a removal and an addition rather than a rewrite?
Because the two lines were not similar enough to pair up. The tool only shows word level marks inside a line when the old and new versions share more than about a third of their characters. Below that, calling it a rewrite would produce a confusing mess of scattered highlights, so it shows the two lines separately instead.
Can I compare Word documents or PDFs?
Not as files. Open the document, select the text and paste it into each box. You lose the formatting, which means a change to a font or a heading style will not appear, but every wording change will. For getting text out of a PDF first, the PDF text extractor on this site also runs in the browser.
What is the patch format for?
It is the unified diff format that Git, GitHub and email based code review all use, with three lines of unchanged context around each change. Copying it gives you something a developer can read immediately, and something that tools can apply. For a plain summary in a message, copy the text of the comparison itself instead.
What does the similarity percentage mean?
It is the share of characters the two versions have in common, counted across matched lines and across matched words inside rewritten lines, then doubled and divided by the total size of both. A small edit to a long document sits in the high nineties. It is a rough gauge of scale, not a legal measure of how much a document changed.
Why did unchanged lines disappear?
Any run of more than eight untouched lines collapses to a button, keeping three lines of context on each side, so a long file shows you the changes rather than everything. Press the button, or Show every line at the top of the comparison, to bring the hidden lines back.
Rewrite the document properly
Take what you made here into documents.
Create a document with OneCraftRelated tools
- Word counterCount words, characters, sentences and paragraphs as you type, and see which sentences are hard work. Runs in your browser, nothing is uploaded or stored.
- Case converterSee sentence case, title case, camelCase, snake_case and eleven more rendered from your own text, then press the one you want to copy it. Runs in your browser.
- JSON formatterFormat and inspect JSON in your browser. A collapsible tree beside the text, errors pinned to the line and column, and warnings for duplicate keys.
- PDF text extractorThe page on one side, its text on the other, editable. Fix the reading order by hand, search it, then copy or download as txt, Markdown or JSON. Not uploaded.
Written and checked by the OneCraft team. Last checked .