How to compare two texts
- Paste the original on the left and the new version on the right, or use Open file. You can drop two files at once.
- Pick how fine the highlighting should be: Line for code and data, Word for prose, Character for typos, IDs and numbers.
- Tick Ignore whitespace or Ignore case if re-indenting or capitalisation shouldn't count as a change. More options lets you skip blank lines, skip lines matching a pattern (timestamps, comments) or sort both texts first.
- Read the result side by side or inline. Use Prev / Next or the strip down the left edge to jump between changes, and Hide unchanged to fold away identical stretches.
- Copy or download a standard
.diffpatch, print the diff or save it as PDF, share it as a link, or ask for a plain-English summary of what changed.
What a diff checker is good at, and where it isn't
A diff checker answers one question precisely: which characters would I have to delete and insert to turn text A into text B? That makes it ideal for checking a contract against the version you signed, spotting what an editor changed in a draft, reviewing a config file before deploying it, or confirming two exports really are identical.
It is not a plagiarism checker. It compares the two texts you give it, not one text against the web, and it doesn't detect paraphrasing. It also compares text, not layout: bold, fonts and page breaks in Word or PDF files are ignored. And when a paragraph is moved, a diff shows it as removed in one place and added in another, because that is literally the shortest set of edits.
Curious how the highlighting is actually decided? Step through the Myers algorithm on your own words: it shows why two diff tools can disagree about which word "changed".
Questions
Is my text uploaded when I compare it?
No. The comparison runs in JavaScript inside your browser tab, so the text you paste or the files you open are never sent anywhere to be diffed. The only exception is the optional "Summarise the changes with AI" button: if you click it, the changed lines (plus two lines of context around each) are sent to generate the summary.
What is the difference between line, word and character mode?
All three first line up the two texts line by line. Line mode then simply marks whole lines as removed or added. Word mode goes one step further inside each changed line and highlights the exact words that differ, which suits prose. Character mode highlights individual letters, which is best for typos, IDs and short strings.
What does "ignore whitespace" do?
It treats runs of spaces, tabs and trailing spaces as equal, so re-indented or re-wrapped lines are not flagged as changes. "Ignore case" does the same for upper- versus lower-case letters. The highlighted output still shows your original text.
How large can the texts be?
Each side can be up to 1,000,000 characters and files up to 20 MB. Texts under about 30,000 characters are compared as you type; larger ones compare when you press Compare. On a typical laptop, two 40,000-line files with scattered edits diff in well under a second. If two very large texts have almost nothing in common, the diff stops after 4 seconds and asks you to compare smaller sections, rather than freezing your browser. The view renders the first 6,000 lines; the downloadable patch always contains every change.
Which files can I open?
Any plain-text file (.txt, .md, .csv, .json, .xml, .yaml, .html, source code and more), plus Word .docx and PDF files with selectable text, whose text is extracted in your browser. Drop two files at once to fill both sides. Scanned PDFs (images of text) are not supported because that would need OCR.
Which diff algorithm does textdiff use?
It uses the Myers O(ND) difference algorithm (Eugene Myers, 1986) through the open-source jsdiff library, the same family of algorithm behind git diff and GNU diff. It finds a shortest edit script: the smallest set of insertions and deletions that turns the original into the changed text.
Can I export or share the result?
Yes. "Copy patch" and "Download .diff" give a standard unified diff that git apply, patch and code review tools understand. "Print / PDF" prints just the highlighted diff (choose Save as PDF in the print dialog). "Share link" puts both texts, compressed, into the part of the link after the # sign, which browsers never send to a server, so the comparison is shared without being stored anywhere.
How do I check whether two texts are exactly the same?
Paste both and look at the result bar: "No differences" means they are identical character for character (or identical apart from whitespace/case if you ticked those options). For short strings that look identical but do not match, the string compare tool lists the hidden character that differs.
Can I ignore lines that always change, like timestamps or comments?
Yes. Open "More options" and enter a regular expression under "Ignore lines matching"; for example \d{4}-\d{2}-\d{2} skips lines containing a date, and ^\s*# skips comment lines in a config file. You can also ignore blank lines, trim every line, or sort both texts first, which is useful when line order does not matter.
How do I compare two files in Notepad++, VS Code or Word?
VS Code: select both files in the Explorer, right-click and choose "Compare Selected". Notepad++ needs the Compare plugin (Plugins > Plugins Admin). Word: Review > Compare > Compare Documents. textdiff does the same job in any browser, including on a phone, with nothing to install.
Is there a similarity percentage?
The result bar shows the share of lines left unchanged and, in word mode, how many words were added and removed. It measures edits, not meaning, so it is not a plagiarism score: reworded sentences count as changed even if they say the same thing.