Text Compare (Diff Checker)
Paste two versions of a document, file or list to compare text online and see exactly what changed, with the edited words highlighted inside each line. The diff check runs in your browser, so nothing is uploaded.
Runs entirely in your browser. Nothing you add is sent to us.
Create a free account to use the Text Compare (Diff Checker)
Free forever for this tool. Takes a few seconds — then you come straight back here.
- All 150 free tools, one login
- Free website audit with fixes
- Search Console dashboard
- Free keyword rank tracker
Already have an account? Sign in
A diff checker shows exactly what changed between two versions of a text, which makes it the quickest way to compare text online. Paste the original on the left and the new version on the right, and our free tool highlights added, removed and modified lines, with the changed words inside each line picked out so small edits are easy to spot. Switch between side-by-side and unified views, ignore differences in whitespace or capital letters, hide unchanged lines or show them all, and copy a simple text diff to share. The comparison uses the same family of algorithms as developer tools such as Git, runs in a background worker so texts of 20,000 lines or more stay responsive, and never leaves your browser.
How to use the Diff checker
- 1 Paste the original textPut the older version in the Original text box, or use Open file to load a text, CSV, JSON, HTML or code file from your computer.
- 2 Paste the changed textPut the newer version in the Changed text box. The comparison updates automatically a moment after you stop typing.
- 3 Choose your optionsTick Ignore whitespace to skip changes in spaces and indentation, and Ignore case to treat capital and small letters as the same. Tick Show unchanged lines to see the whole document rather than just the changes.
- 4 Read the differencesRemoved lines are red, added lines are green, and modified lines show both versions with the exact words that changed highlighted more strongly.
- 5 Switch view or copyUse Side by side on wide screens and Unified on phones or for a compact list. Copy diff gives you a plain text summary with - and + markers.
What a diff checker does when you compare text online
Comparing two versions of a document by eye is slow and unreliable. A missing word in a long paragraph, a changed figure in a price list or an extra line in a configuration file is easy to miss. A diff checker does the comparison for you, line by line, and shows only what is different.
People use text comparison for far more than code. Solicitors and contract managers compare drafts to see what the other side has changed. Copywriters check which edits a client made to web copy. Website owners compare old and new robots.txt, .htaccess or sitemap files before uploading them, and SEO teams compare page titles and meta descriptions before and after a site migration. Developers compare configuration files, API responses and log extracts. In each case the question is the same: what exactly is different?
How the comparison works
The tool first splits each text into lines and looks for the longest sequence of lines the two versions share in the same order. Everything outside that shared sequence is a change: lines only in the original were removed, and lines only in the new version were added. Finding that sequence efficiently is a classic computer science problem, and this tool uses the Myers difference algorithm, the same approach behind the default diff in Git and many other tools. It produces the smallest possible set of added and removed lines.
For very large or very different texts, the tool anchors the comparison on lines that appear exactly once in both versions, a technique known as patience diff, and then compares the gaps between those anchors. This keeps big comparisons fast without changing the result for typical edits. The work runs in a Web Worker, a background thread in your browser, so the page stays responsive while tens of thousands of lines are compared.
When a block of lines has been removed and a block added in the same place, the tool pairs up the lines that look most alike and shows them as modified. It then runs a second, word-level comparison inside each pair, so if only a date or a price has changed you see that word highlighted rather than having to reread the whole line.
Side-by-side or unified view
The two views show the same differences in different layouts. Choose whichever is easier to read for the job in hand.
- Side by side: the original is on the left and the new version on the right, with line numbers for both. Removed lines leave a grey gap on the right and added lines leave a gap on the left, so the two versions stay aligned. This is the easiest view for reviewing documents on a laptop or desktop screen.
- Unified: both versions are merged into one column. Removed lines start with a minus sign and are shaded red, added lines start with a plus sign and are shaded green. This view is more compact, works well on phones, and is the layout most developers know from Git and code review tools.
- Context: by default, unchanged lines are hidden except for three lines either side of each change, with a note showing how many lines were skipped. Tick Show unchanged lines to see the full text.
Ignoring whitespace and case
Not every difference matters. If one version was copied from a PDF, reformatted by a word processor or re-indented by a code editor, you may see dozens of lines flagged as changed when only spaces or tabs differ. Ignore whitespace treats any run of spaces and tabs as a single space and ignores spaces at the start and end of each line, so you only see changes to the actual words.
Ignore case treats London and LONDON as the same, which helps when a heading style has changed from title case to capitals or when comparing lists of email addresses and domains, which are not case sensitive. Both options affect which lines are matched up, but the text you see is always the original text from each side, so nothing is hidden or rewritten.
Be careful with these options when the difference itself matters. In Python code and YAML files, indentation changes meaning, and in passwords, product codes and some URLs, case does too. Turn the options off when you need a strict comparison.
Practical uses for website owners
Before you replace a live configuration file, compare it with the new version. A diff of your current robots.txt against an edited copy shows instantly whether a Disallow rule has been added that could block important pages from search engines. The same goes for .htaccess redirect rules, security headers and DNS zone exports, where one wrong line can take a site or its email offline.
During a site migration or redesign, export your old and new page titles, meta descriptions or URL lists and compare them to check nothing has been lost or changed by accident. When a page suddenly drops in search results, comparing a saved copy of the old text with the current version can reveal edits that removed key information. For legal pages such as privacy policies and terms, keeping dated copies and comparing them makes it easy to summarise what changed for customers.
Other ways to run a diff check, and when this tool is quicker
An online text compare tool is not the only option, and for some jobs another tool is the better fit. Knowing the alternatives helps you pick the fastest route for the file in front of you.
- Microsoft Word: Review, then Compare, then Compare Documents shows the differences between two .docx files as tracked changes, keeping the formatting. It is the better choice when layout, styles or comments matter, rather than just the words.
- Google Docs: Tools, then Compare documents, produces a copy of the document with the differences shown as suggestions, attributed to the person you choose.
- Git: git diff compares versions of files in a repository, and git diff --no-index file-a.txt file-b.txt compares any two files on disk, even outside a repository.
- Command line: diff -u old.txt new.txt on macOS and Linux prints a unified diff, the same format as Copy diff here. On Windows, fc old.txt new.txt in Command Prompt lists differing lines.
- Code editors: VS Code can compare two open files (select both in the Explorer, then Compare Selected), and many other editors offer a similar side-by-side view.
- This tool: best when the text is already on your clipboard, comes from two different places such as an email and a web page, or you are on a computer where you cannot install anything. Paste both versions and the diff check is done in seconds.
Large texts and privacy
The checker comfortably handles documents of around 20,000 lines on a typical laptop, and accepts up to 50,000 lines on each side. Very long single lines, such as minified code, are still compared line by line, but word highlighting is skipped for extremely long lines to keep things fast. If two huge files are almost completely different, the tool may show them as a block of removed lines followed by a block of added lines, which is accurate but less useful than comparing smaller sections.
Contracts, HR documents, unpublished copy and configuration files often contain confidential information. This diff checker runs entirely in your browser. Files you open are read locally, nothing is uploaded, stored or logged, and the texts disappear when you close the tab. That makes it suitable for comparing material covered by a non-disclosure agreement or containing personal data.
Examples you can copy
Unified diff output (Copy diff)
Opening hours
- Monday to Friday: 9am to 5pm
+ Monday to Friday: 8am to 6pm
Sunday: closed
+ Bank holidays: closed
Spotting a risky robots.txt change
User-agent: *
Disallow: /admin/
+ Disallow: /
Sitemap: https://www.example.co.uk/sitemap.xml
The added line blocks the whole site from crawling.
Common mistakes to avoid
Putting the versions on the wrong sides
Additions and removals are worked out from left to right. Keep the older text on the left, or use Swap sides if you paste them the wrong way round.
Ignoring whitespace in code where it matters
Indentation changes meaning in Python and YAML. Leave Ignore whitespace off when comparing files like these.
Comparing formatted text with plain text
Copying from a PDF or word processor can add line breaks in different places, making every line look changed. Compare text from the same source format where possible.
Reading only the summary counts
A single modified line can change the meaning of a contract or the behaviour of a config file. Read the highlighted changes, not just the numbers.
Comparing whole huge files that are completely different
If almost every line differs, a diff adds little. Compare the relevant sections instead.
Frequently asked questions
Yes. The comparison runs entirely in your browser and nothing is uploaded or saved, so it is safe for contracts and confidential drafts.
It uses the Myers difference algorithm, the same approach used by Git, with patience-style anchoring for very large texts and a word-level pass inside changed lines.
Paste the first version on the left and the second on the right. The differences appear below straight away, with removed lines in red, added lines in green and changed words highlighted.
Both. Lines are matched first, then each modified line is compared word by word so you can see exactly which words, numbers or punctuation changed.
Yes. Use Open file above either box to load a text-based file such as .txt, .csv, .json, .html, .xml or a code file. It is read in your browser and not uploaded.
Not directly, as those are not plain text files. Copy the text out of each document and paste it into the boxes, ideally from the same type of source so line breaks match.
They are the line numbers in the original and the changed text, so you can find each change in your own files.
Each side can have up to 50,000 lines. Around 20,000 lines compares quickly on most devices, and the work runs in the background so the page does not freeze.
It is a comparison of two versions of a text that lists only what differs between them. The name comes from diff, the Unix command that has produced this kind of comparison since the 1970s.
No. A diff checker compares the two texts you give it and nothing else. A plagiarism checker searches other sources for similar wording. Use a diff checker when you already have both versions.
Put one item on each line and sort both lists in the same order first, for example alphabetically. The diff then shows items only in the first list as removed and items only in the second as added.
A plain text version of the differences, with a minus sign in front of removed lines and a plus sign in front of added lines, ready to paste into an email or ticket.
Learn more
- How to Compare Two Text Files: 7 Free Methods for Windows, Mac and Online How to compare two text files for free: an in-browser diff checker, Windows fc, diff on Mac and Linux, git diff, VS Code and Word, and keeping data private.
- Cosmetics Product Launch Checklist: A Workflow From Formula to Shelf A cosmetics product launch checklist run as a workflow: formula lock, safety, labels, CPNP, SCPN and MoCRA notices, claims and listings, with people in charge.
- Insurance Broker Renewal Workflow: Automating the Preparation, Not the Advice An insurance broker renewal workflow: a pipeline from expiry dates, early information requests, change summaries and notice checks, with advice kept human.
- LLM Evaluation Workflow: Tracking Regressions on Every Change An LLM evaluation workflow for AI product teams: versioned test sets, evals on every change, regression thresholds, human review and a clear release gate.
- Supplement Claims Review Workflow: Checking Product Pages Before They Go Live A supplement claims review workflow for product pages: an approved claims library, automated pre-checks by market, and sign-off by a qualified person.
- Support Ticket Triage and Release Notes: A Workflow for Software Companies A support ticket triage and release notes workflow for software teams: consistent tagging, urgent escalation, linked bugs, drafted notes and customer follow-up.
Free website audit
See how your site scores, free
Speed, SEO, DNS, email (SPF/DKIM/DMARC) and security in one scan, with a prioritised fix list.