Written by the Utiliby editorial team · Last updated October 17, 2026 · Rules and formulas reviewed October 2026
What this free text compare tool does
You have two versions of a document and need to know what changed. Maybe a client returned a contract with edits, an editor reworked your essay, a colleague updated a configuration file or a translation was revised. Reading both side by side is slow and you will miss things. This free online text compare tool does the checking for you: paste both versions and it marks every addition, deletion and change.
It compares by words, lines, sentences or characters, ignores case, spacing, punctuation or blank lines on request and shows the result three ways: inline, side by side and as a summary with a change-by-change list. In lines mode it highlights the changed words inside an edited line and can export a unified diff. A similarity score and a bar chart show at a glance how much has changed.
Everything happens in your browser, so confidential drafts, contracts and code are never uploaded.
How to compare two texts
- Paste the original text into the left box and the changed text into the right box. Or press Try a sample.
- Choose how to compare. Words are best for prose, lines for lists and code, sentences for long documents and characters for finding a single typo.
- Set the options. Ignore case, spaces, punctuation or blank lines if those differences do not matter to you.
- Read the inline view. Green underlined text was added and red struck-through text was removed.
- Switch to side by side to see both versions together. In lines mode the rows line up and line numbers are shown.
- Open the summary for the similarity score, counts of words and characters added and removed and a list of each change.
- Copy, download or print the report.
Choosing a comparison mode
| Mode | Best for | What counts as a change |
|---|---|---|
| Words | Essays, articles, contracts, emails | Any added, removed or replaced word or punctuation mark |
| Lines | Code, lists, CSV, config files, poems | A whole line that differs, with edited words highlighted inside it |
| Sentences | Long documents, translations, abstracts | A sentence that differs in any way |
| Characters | Spotting typos and one-letter changes | Every added, removed or replaced character |
If a result looks too noisy in one mode, try another. Comparing a rewritten paragraph by characters will show a mess, while words or sentences give a cleaner picture. Comparing a list by words will not show that two lines were swapped, whereas lines mode will.
Ignoring differences that do not matter
Not every difference is a change you care about. Text copied from different programs often differs in trailing spaces, line endings or capitalisation, and these would drown out the real edits. The options hide them.
- Ignore case treats Policy and policy as the same.
- Ignore spaces and tabs treats repeated spaces as one and ignores whitespace-only differences.
- Ignore punctuation hides differences that involve only punctuation marks, such as a comma added or a full stop removed.
- Ignore blank lines removes empty lines before comparing by lines.
When an option hides every difference, the tool says so, so you are not misled into thinking the texts are exactly the same.
How the comparison works
Finding the differences between two texts is a classic problem. The goal is to find the longest common subsequence, the longest run of items that appear in both texts in the same order. Everything outside it is an addition or a deletion. The tool uses the Myers algorithm, published in 1986 and still the basis of the diff command in Unix and of the diff views in version control systems. It finds the shortest edit script, the fewest insertions and deletions needed to turn the original into the changed text, and it is fast when the texts are similar.
Before comparing, the tool trims the common beginning and end of both texts, which makes long documents with a few edits very quick. After comparing, it groups neighbouring edits into changes and, in lines mode, runs a second word-level comparison inside lines that were edited, so you see exactly which words changed.
The similarity score is twice the number of unchanged items divided by the total number of items in both texts. Two identical texts score 100 percent and two texts with nothing in common score 0. The score reflects edit overlap only. It says nothing about meaning, quality or originality.
What people use a text compare tool for
- Contracts and policies. See what a counterparty changed before you sign.
- Essays and articles. Check what an editor or teacher changed, or confirm that a revised draft includes the requested edits.
- Code and configuration. Spot a changed setting between two copies of a file.
- Translations and localisation. Compare a new version of a translated text with the old one.
- Data and lists. Find lines added or removed between two exports.
- Proofreading. Compare a text before and after a spell check to confirm only the intended words changed.
- Terms and conditions. Track changes between versions of a public policy.
Tips for clearer results
- Pick the mode first. Most confusing diffs come from using the wrong mode.
- Normalise line endings and spacing by ticking Ignore spaces when the text was copied from different programs.
- Compare like with like. Remove headers, footers and page numbers that appear in only one copy.
- Swap the texts if additions and removals look the wrong way round.
- Use the change list in the summary tab to review each change in turn.
- Download the unified diff in lines mode if you need to share changes with a developer.
Common mistakes when comparing texts
- Treating similarity as plagiarism. A diff compares two texts only. It cannot tell you whether either was copied from elsewhere.
- Comparing formatted documents. Only text is compared. Bold, comments and tracked changes are not.
- Forgetting hidden differences. Non-breaking spaces and different quote marks look identical but are different characters.
- Pasting a table. Tables lose structure when pasted as plain text, so compare by lines.
- Ignoring too much. If you ignore punctuation and case you may miss a change that matters, such as a negation or a number.
Limits and privacy
The tool compares plain text only. It cannot read formatting, images, comments or tracked changes, and it cannot compare whole files. The diff shows what changed and not whether a change is correct or important. A similarity score is not evidence of plagiarism. Results are deterministic, so the same two texts always give the same result. Nothing you paste is uploaded, stored or logged, and clearing or refreshing the page removes it.
Related free tools
Use these free online tools together with this one:
- Count the words in each version with the word counter.
- Proofread the changed version with the grammar and style checker.
- Normalise capitalisation before you compare with the text case converter.
- Check references after an edit with the citation generator.
- See how an edit changes the page count with the words to pages calculator.
- Compare the rhythm of two poem drafts with the syllable counter.
- Make minified code readable before you compare it with the code unminifier.
- Draft a licence to compare with the license file generator.
- Check whether two files are byte-for-byte identical with the hash generator.
Frequently asked questions
How do I compare two texts online with this tool?
Paste the original into the left box and the changed version into the right box. The differences appear straight away. Added text is underlined in green and removed text is struck through in red.
What is the difference between comparing by words, lines, sentences and characters?
Words suit prose such as essays and contracts. Lines suit lists, code and configuration files. Sentences show which sentences changed in a longer text. Characters pinpoint tiny differences such as a single changed letter.
What does the similarity percentage mean?
It is twice the number of unchanged items divided by the total items in both texts. A score of 100 percent means identical, and lower scores mean more change. It measures edit overlap, not originality, so it is not a plagiarism score.
Can it ignore case, spaces or punctuation?
Yes. Tick the options to ignore upper and lower case, extra spaces and tabs, punctuation or blank lines. Differences that vanish under those options are not marked.
What algorithm does it use?
It uses the Myers difference algorithm, the same family of method that powers the diff command and version control systems. It finds the smallest set of additions and deletions that turns one text into the other.
Can I compare code?
Yes. Use lines mode and the side-by-side view. Lines mode also produces a unified diff you can download and share. For code review in a project, a version control system is still the better long-term tool.
How do I compare two versions of a Word or PDF document?
Copy the text from each document and paste it in. Formatting, images and tracked changes are not compared, only the text.
Is this a plagiarism checker?
No. It compares only the two texts you paste. It cannot search the web or other documents, and a high similarity score does not by itself prove copying.
Does it show where a single line changed inside the line?
Yes. In lines mode, when a line is edited rather than replaced, the words that changed within the line are highlighted in both the inline and side-by-side views.
What is a unified diff?
A text format used by developers that marks removed lines with a minus sign, added lines with a plus sign and shows a few unchanged lines around each change. Download it in lines mode.
Can I swap the two texts?
Yes. The Swap button exchanges the boxes, so the changes reverse: additions become removals.
Why are two texts reported as identical when they look different?
You may have ticked an option that ignores case, spaces, punctuation or blank lines. The result message says when differences were hidden by an option.
Is there a size limit?
There is no fixed limit. Word and line comparisons of tens of thousands of words run in well under a second on a modern device. Character mode is limited to 30,000 characters per text for speed.
How do I print or save only the comparison?
Use the print or save button. The printout contains the summary and the marked-up differences, not the page layout or the article. Added text is underlined and removed text is struck through so it reads in black and white.
Is my text uploaded or stored?
No. The comparison runs in your browser and nothing is sent or saved.
Can I copy only the changes?
Yes. Copy report gives the summary and a list of changes, and in lines mode the unified diff. Download diff saves the same as a file.
Is this text compare tool free?
Yes. It is free to use online with no sign-up and no limit on use.
Sources and further reading
- Myers, E. W. (1986), An O(ND) difference algorithm and its variations, Algorithmica 1.
- Hunt, J. W. and McIlroy, M. D. (1976), An algorithm for differential file comparison, Bell Laboratories Computing Science Technical Report 41.
- GNU Project, Diffutils manual: unified format.
- Git, git-diff documentation.
Sources were consulted in October 2026. Standards and rules can change, so always check the official page for your situation.