How to use the diff checker
- 1 Paste the original text on the left and the changed text on the right.
- 2 Choose Line by line or Inline words.
- 3 Tick options like Ignore upper and lower case or Show only changes.
- 4 Read the highlighted differences and the summary counts.
Line view or word view?
A diff finds the smallest set of additions and deletions that turns the first text into the second. How you view it depends on the content:
- Line view suits code, lists and data, where each line is a unit. Changed lines are shown removed in red and added in green.
- Word view suits prose, contracts and essays, where one changed word in a long paragraph is what you need to see.
- Whitespace: a stray space or a different line break counts as a change. Clean both versions with Remove Extra Spaces if you only care about wording.
For lists where order does not matter, sort both versions first with Sort Lines Alphabetically so only real differences show.
Features
Two views
Line by line with numbers, or inline like tracked changes.
Word-level highlights
See the exact words that changed inside a line.
Ignore options
Ignore case and extra spaces to focus on real changes.
Summary
Counts of added, removed and unchanged lines.
When to use it
Contracts and documents
Check what changed between two drafts. Clean spacing first with Remove Extra Spaces so only real changes show.
Writing and editing
Compare your text with an edited version. Sort both lists first with Sort Lines Alphabetically.
Code and config
Spot changes between two files. Apply a change everywhere with Find and Replace.
Plagiarism checks
See how closely two texts match. Number lines with Add Line Numbers to point to changes.
Related Text tasks
Frequently asked questions
How does the comparison work?
It uses the same kind of algorithm as professional version control tools to find the smallest set of changes that turns the original into the new text.
What do the colours mean?
Red shows text that was removed from the original. Green shows text that was added in the new version.
What is the difference between the two views?
Line by line is best for code, lists and documents with clear lines. Inline words is best for paragraphs of prose.
Can I compare large documents?
Yes. Documents with thousands of lines compare in a moment.
Can I compare Word or PDF files?
Copy the text out of each file and paste it here. Our PDF to Text tool can extract text from PDFs.
What does Ignore extra spaces do?
It treats lines that only differ by spacing as identical, which is useful for text copied from different sources.
Can I swap the two texts?
Yes. Press Swap to exchange the original and changed texts and see the changes the other way round.
What does Show only changes do?
It hides unchanged lines so you can focus on what is different in long documents.
Can I compare two versions of a contract?
Yes. Paste both versions and use the word view; it shows every changed word inside long paragraphs, which is what matters in legal text.
Can I compare code?
Yes. Line view works well for code, and the ignore extra spaces option hides changes that are only indentation.
How this tool works. These text tools run entirely in your browser with plain JavaScript, so the text you paste never leaves your device and results update as you type. Each tool is tested with real text such as copied PDFs, emails, code, lists, emojis and non-English scripts before it goes live.
Built and reviewed by Hamza Farooq, founder and lead developer
· Last updated
· How we check our tools
· Report a problem