Text compare · Free · Nothing uploaded
Compare Text
To compare text, paste the original in one box and the changed version in the other: every line that differs is marked, with changed words struck through or underlined. This compare also names the hard-to-see differences, a no-break space, a curly apostrophe or a Cyrillic letter, that make identical-looking lines differ.
The example: two versions of opening hours, 82% similar, two of the four changed lines differing only in characters you cannot see.
Nothing typed yet. Both texts are kept in this browser only.
- Similarity
- –
- Lines unchanged
- 0
- Lines changed
- 0
- Lines removed
- 0
- Lines added
- 0
- Hard-to-see differences
- 0
The differences
The differences appear here, line by line.
Differences you cannot see
Lines that differ only in invisible or look-alike characters are named here.
Compared in this browser. Both texts are kept on this device so they survive a reload, and are never sent anywhere: Clear both removes them.
Paste two versions, or open a file into each box. The differences appear as you type, side by side or in one column, and nothing leaves your browser.
A text compare, or diff, lines two versions of a text up and shows what was removed, added and changed between them. It is exact: any character that differs, including one you cannot see, makes a line different.
- No sign-up
- Nothing uploaded
- Rules stated
- Works offline
- Invisible characters named
Key facts
| Detail | Answer |
|---|---|
| Price | Free, no sign-up, nothing to install |
| Compares | Lines, with changed words or characters marked; or running text |
| Lined up by | Myers’ difference algorithm (1986), as in git |
| Similarity | 2 × shared characters ÷ all characters |
| Named | No-break and zero-width spaces, tabs, BOM, quotes, dashes, look-alike letters |
| Ignore | Capitals, spacing, blank lines, quotes, accent forms |
| Files | Plain text, read on your device |
| Where texts are kept | This browser only |
How to compare two texts
Put both versions in, choose how to compare, read the differences.
Put in the original
Paste the first version into Original text, or open a file into it.
Put in the changed version
Paste the second version into Changed text, or open a file.
Choose how to compare
Lines with words marked is the default; characters for codes, running text for re-wrapped paragraphs.
Tick what to ignore
Capital letters, spacing, blank lines, quotes or accent forms, if they do not matter to you.
Read the differences
Removed text is struck through, added text underlined, and lines that differ only invisibly are named underneath.
Copy the result
Copy the differences gives a unified diff, or a word diff for running text.
Who compares texts
Anyone holding two versions of something and needing to know exactly what changed.
Writers and editors
What a co-author or an editor changed in a returned draft, word by word.
Contracts and policies
Whether the clause sent back for signature is the clause that was agreed.
Developers
Two configuration files, two API responses or two log lines, characters marked, and the zero-width space that broke a build named.
Data and spreadsheets
Why two cells that look identical do not match in a lookup: a no-break space or a trailing space, named.
Translators
A source text against its updated version, to translate only what changed.
Teachers and students
Two versions of an essay or an answer, re-wrapped text compared as running text.
Security checks
A web address or a payee name against the real one, look-alike letters named.
Subtitles and transcripts
Two caption files, line by line, after a re-edit.
Why lines that look the same are marked as different
Every text compare marks a line that differs. The question it leaves open is the one people ask most often about the result: why is a line marked when the two versions look exactly the same? The answer is nearly always a character that prints as nothing, or as something you cannot tell apart from the character you expect. A no-break space looks like a space. A zero-width space looks like nothing at all. A Cyrillic а looks like a Latin a in most fonts. A comparison is exact, so to it these are different characters, and the line is different.
This compare does two things about that. In the comparison, a hard-to-see character inside a change is drawn as a small labelled box, NBSP or ZWSP, and a change made only of spaces is drawn as dots. And under Differences you cannot see, every line whose only differences are characters like these is listed, with each character named, its Unicode code point, and where in the line it is.
| Character | Code point | Where it usually comes from | Shown here as |
|---|---|---|---|
| No-break space | U+00A0 | Word processors and web pages, to keep two words on one line (“10 kg”, “Mr Smith”); in HTML; some phone keyboards | NBSP |
| Narrow no-break space | U+202F | French punctuation spacing, and the space that newer Unicode locale data (CLDR 42, 2022) puts before AM and PM in English times | NNBSP |
| Zero-width space | U+200B | Web pages and chat apps, which add it as a place a long word may break; copied in with the text | ZWSP |
| Zero-width joiner | U+200D | Inside emoji made of several (a family, a flag), and in scripts such as Devanagari | ZWJ |
| Byte order mark | U+FEFF | The start of a file saved as “UTF-8 with BOM”, as Excel saves CSV UTF-8 and older Notepad saved UTF-8 | BOM |
| Soft hyphen | U+00AD | Hyphenation points in typeset text and in text copied out of some PDFs | SHY |
| Tab | U+0009 | Indents, and cells copied out of a spreadsheet, which are separated by tabs | TAB |
| Curly quotes and apostrophes | U+2018, U+2019, U+201C, U+201D | AutoCorrect’s smart quotes in Word, Google Docs and phone keyboards, against straight ' and " from code and plain-text editors | Named in the list |
| En dash, em dash, minus sign | U+2013, U+2014, U+2212 | AutoCorrect turning a hyphen between spaces into a dash, and typeset numbers using a true minus | Named in the list |
| A Cyrillic or Greek letter that looks Latin | e.g. U+0430 а, U+043E о, U+0391 Α | A keyboard left on another language, text recognised from a scan, and look-alike web addresses (homoglyphs) | Named in the list |
| An accent stored as a separate mark | e.g. e + U+0301 | File names from older Mac disks and text copied out of some PDFs, which store é as e followed by a combining accent | Named in the list |
The example, worked. Press Try an example and two versions of a shop’s opening hours go in. Two lines are visible edits: 5pm became 6pm, and 2pm became 4pm. Two more are marked although they read the same. Line 5, Call us on 020 7946 0000., has a no-break space between 020 and 7946 in the changed text, the kind a word processor puts in a phone number to keep it on one line. Line 6, We’re closed on bank holidays., has a curly apostrophe in the original and a straight one in the changed text. The list names both: the original has a space (U+0020) where the changed text has a no-break space (U+00A0), at character 15.
Whether such a difference matters depends on the text. In a contract or an essay it usually does not, and the Ignore settings below take most of them out. In a password, a product code, a spreadsheet lookup, a line of code or a web address it is exactly the difference that breaks things, and it is the one the eye will never find.
How the two texts are compared: lines, words and characters
Both texts are split into lines. The two lists of lines are lined up with Myers’ difference algorithm, published by Eugene W. Myers in 1986 (“An O(ND) Difference Algorithm and Its Variations”, Algorithmica 1) and the default in git and GNU diff. It finds the longest run of lines the two texts share in order; every other line is removed or added. Of all the ways to explain the difference, it picks one with the fewest lines removed and added.
Where removed and added lines sit together, the compare then decides which of them are the same line, changed. Each removed line is paired with the added line most like it, keeping their order, if the two are at least half the same by characters; the rest stay removed or added. That is why, in the example, Sunday: closed is shown removed rather than changed into the phone number line under it. Inside a changed pair, the words that differ are marked, or the characters, under Compare by:
Lines, changed words marked (the default) suits prose and most documents. A word here is a run of letters or digits; a run of spaces and each punctuation mark are separate pieces, so a changed comma is marked on its own.
Lines, changed characters marked suits codes, numbers, names and anything where one letter matters: INV-2026-0417 against INV-2026-0471 marks the two digits, not the whole code.
Running text, line breaks ignored suits text that was re-wrapped: a paragraph copied out of a PDF, an email or a narrow column breaks its lines in different places, and a line-by-line compare would mark every line. Here line breaks count as spaces and the whole text is compared word by word, removed words struck through, added words underlined.
Each row below was typed into the tool. The result column is the line under the percentage on the board:
| The difference | Original | Changed | Result | Similarity | Hard to see |
|---|---|---|---|---|---|
| A word changed | Open 9am to 5pm | Open 9am to 6pm | 1 changed · 0 removed · 0 added | 93% | – |
| A line added | One ¶ Two | One ¶ Two ¶ Three | 0 changed · 0 removed · 1 added | 70% | – |
| A line removed | One ¶ Two ¶ Three | One ¶ Three | 0 changed · 1 removed · 0 added | 84% | – |
| A line moved | One ¶ Two ¶ Three | Two ¶ Three ¶ One | 0 changed · 1 removed · 1 added | 72% | – |
| A line edited, more than half the same | Total: 40 ¶ Paid in cash | Total: 40 ¶ Paid by card | 1 changed · 0 removed · 0 added | 80% | – |
| A line rewritten, less than half the same | Total: 40 ¶ Paid in cash | Total: 40 ¶ Shipped on Monday | 0 changed · 1 removed · 1 added | 38% | – |
| A capital letter | Call us today | call us today | 1 changed · 0 removed · 0 added | 92% | – |
| … with Ignore capital letters | Call us today | call us today | Identical | 100% | – |
| Two spaces for one | Two· spaces | Two spaces | 1 changed · 0 removed · 0 added | 95% | Named |
| A space at the end of a line | Total due | Total due· | 1 changed · 0 removed · 0 added | 94% | Named |
| … with Ignore spacing | Total due | Total due· | Identical | 100% | – |
| A blank line added | One ¶ Two | One ¶ ¶ Two | 0 changed · 0 removed · 1 added | 99% | – |
| … with Ignore blank lines | One ¶ Two | One ¶ ¶ Two | Identical | 100% | – |
| A no-break space for a space | 020 7946 0000 | 020NBSP7946 0000 | 1 changed · 0 removed · 0 added | 92% | Named |
| A zero-width space | invoice-2026 | invoiceZWSP-2026 | 1 changed · 0 removed · 0 added | 96% | Named |
| A tab for a space | Name Total | NameTABTotal | 1 changed · 0 removed · 0 added | 90% | Named |
| A curly apostrophe for a straight one | We’re open | We're open | 1 changed · 0 removed · 0 added | 90% | Named |
| … with curly and straight quotes the same | We’re open | We're open | Identical | 100% | – |
| An en dash for a hyphen | pages 10-12 | pages 10–12 | 1 changed · 0 removed · 0 added | 90% | Named |
| A Cyrillic а for a Latin a | Pay to account 1 | Pаy to account 1 | 1 changed · 0 removed · 0 added | 93% | Named |
| An accent stored two ways | café | café | 1 changed · 0 removed · 0 added | 66% | Named |
| … with accents stored two ways the same | café | café | Identical | 100% | – |
A moved line is removed and added. The rows show it: move One from the top to the bottom and the compare keeps Two and Three in place and shows One removed above them and added below. That is what any order-keeping comparison does, git and Word’s Compare included unless they look for moves separately. For a count of words moved between drafts, the edit counter recognises whole sentences that moved.
What each Ignore setting treats as the same
By default the compare is exact: one character different is a different line. The five Ignore settings each say that a kind of difference does not count. They change only what is treated as the same; the text shown is always your own, unchanged.
| Setting | Treated as the same | Still a difference |
|---|---|---|
| Ignore capital letters | Call and call, in every alphabet with capitals | Accents: resume and résumé |
| Ignore spacing | Two spaces and one; spaces at the start or end of a line; a tab and a space; a no-break space and a space | A space where there was none: data base and database; a zero-width space, which is not a space to Unicode |
| Ignore blank lines | Empty lines, and lines of nothing but spaces, anywhere | Where a paragraph breaks, if the words moved between lines |
| Curly and straight quotes are the same | ‘ ’ and ', “ ” and " | Dashes and hyphens, which can change a meaning: 10–12 is a range |
| Accents stored two ways are the same | é as one character and as e with a combining accent (Unicode NFC normalisation) | é and e: those are different letters |
On the example, the settings take out exactly the differences they name:
| Ticked | Similarity | Changed | Removed | Added | Hard to see |
|---|---|---|---|---|---|
| None (the default) | 82% | 4 | 1 | 1 | 2 |
| Ignore capital letters | 82% | 4 | 1 | 1 | 2 |
| Ignore spacing | 83% | 3 | 1 | 1 | 1 |
| Curly and straight quotes are the same | 83% | 3 | 1 | 1 | 1 |
| All five Ignore settings | 83% | 2 | 1 | 1 | 0 |
Ignore spacing removes the no-break space; the quotes setting removes the apostrophe; capital letters change nothing, because none differ. With all five ticked, the two lines left changed are the two real edits to the hours, and Sunday and the parking line are still removed and added.
How the similarity percentage is worked out
The percentage on the board is how much of the two texts is the same, by characters:
Similarity = 2 × shared characters ÷ (characters in the original + characters in the changed text)
It is the ratio Python’s standard difflib library calls ratio(), and it treats the two texts alike: swap them and the figure does not change. Shared characters are those of the unchanged lines and, in a changed line, the characters the two versions have in common in order. Line breaks are not counted, and the Ignore settings apply, so with Ignore capital letters ticked, Call and call share all four. The figure is rounded down, so 100% means identical; a text with only a blank line added reads 99%.
| Row | Original line | Changed line | Characters, original | Characters, changed | Shared |
|---|---|---|---|---|---|
| Unchanged | 1 | 1 | 13 | 13 | 13 |
| Changed: 5pm to 6pm | 2 | 2 | 28 | 28 | 27 |
| Changed: 2pm to 4pm | 3 | 3 | 21 | 21 | 20 |
| Removed: Sunday: closed | 4 | – | 14 | 0 | 0 |
| Changed: a no-break space | 5 | 4 | 25 | 25 | 24 |
| Changed: a straight apostrophe | 6 | 5 | 30 | 30 | 29 |
| Added: Parking is free after 6pm. | – | 6 | 0 | 26 | 0 |
| Total | 131 | 143 | 113 |
So the example is 2 × 113 ÷ (131 + 143) = 226 ÷ 274 = 82.5%, shown as 82%. Compared as running text, where the removed and added words are counted rather than whole lines, it is 79%.
Similarity is not a plagiarism score. It measures two texts against each other, in order, character by character. A plagiarism checker searches one text against millions of others and reports matching passages wherever they are. Two essays that say the same thing in different words can be 20% similar here; a text pasted twice in a different order can score low too, because order counts.
Copying the differences, and opening files
Copy the differences puts the comparison on your clipboard as text, in a format other tools read. Compared by lines, it is a unified diff, the format of diff -u and git diff: a line starting - is in the original only, + in the changed text only, and a space means unchanged; each block starts with @@ and the line numbers it covers. The example copies as:
--- Original
+++ Changed
@@ -1,6 +1,6 @@
Opening hours
-Monday to Friday: 9am to 5pm
+Monday to Friday: 9am to 6pm
-Saturday: 10am to 2pm
+Saturday: 10am to 4pm
-Sunday: closed
-Call us on 020 7946 0000.
+Call us on 020 7946 0000.
-We’re closed on bank holidays.
+We're closed on bank holidays.
+Parking is free after 6pm.Compared as running text, it is git’s word-diff form instead: removed words in [- -] and added words in {+ +}, in place, as in 9am to [-5pm-]{+6pm+}. With an Ignore setting ticked, the copy shows the comparison as you see it, so it may not apply cleanly as a patch.
Opening files
Each box has its own Open a file button for plain-text files: .txt, .md, .csv, .json, .xml, .html, source code, logs and subtitles. The file is read on your device, as UTF-8 or, if it starts with the marks for it, UTF-16. A file opened here keeps its byte order mark, so a file saved with one and a file saved without compare as different on their first line, and the compare names the BOM, which is the usual reason a desktop diff marks the first line of two identical-looking CSV files.
Line endings are reported, not compared. Windows ends lines with two characters (CR LF), Mac and Linux with one (LF). A text box in a browser turns every line ending into LF as the text goes in, so the compare cannot see them; instead the note under the boxes says which endings the opened file used. Word, PDF and spreadsheet files are not read: copy their text in, or, for a Word file’s tracked changes, use the edit counter, which reads them.
What this compare does not do
| It does | It does not |
|---|---|
| Show two texts line by line, side by side or in one column, with changed words or characters marked | Recognise a moved line as moved: it is removed in one place and added in another |
| Name the invisible and look-alike characters that make a line differ | Change your text: it shows the characters, and you correct them in your own copy |
| Give a similarity percentage with its formula | Check for plagiarism against other sources, or judge whether two texts say the same thing in other words |
| Open plain-text files and report their line endings and byte order mark | Read Word, PDF or spreadsheet files, compare formatting, or compare images |
| Copy the result as a unified diff or a word diff | Merge the two versions into one, or keep a history of versions |
| Keep both texts in this browser only | Send your text anywhere, or keep it after you clear it |
For counting how much an edit changed, the words kept, cut, added and moved, use the edit counter; for the length of either version, the word counter.
This compare, Diffchecker, Text Compare! or Word
Four ways to compare two versions of a text, and where each stops. The online tools are described from their own pages, read on 30 October 2026.
| This compare | Diffchecker | Text Compare! | Word’s Compare | |
|---|---|---|---|---|
| Words or characters marked | Either, free | Word and character precision free to try, unlimited on Pro | Character detail | Word or character level |
| Ignore case and spacing | Free, plus blank lines, quotes and accents | Yes | Pro | Formatting and case options |
| Invisible characters named | Named, with code points | Not described | Not described | No |
| Similarity percentage | Yes, formula stated | Not described | Not described | No |
| Re-wrapped text | Running-text mode | Line by line | Line by line | By paragraph |
| Where your text goes | Nowhere: this browser only | Its page says the comparison runs in your browser | Its page says text is sent to its server, encrypted, and not stored | Your computer |
More writing tools
Every writing tool on the site runs in your browser, needs no sign-up, and sends nothing anywhere.
Format & compare1
Sort, recase and compare text, generate words and format citations.
All 6 writing tools, by category: Counts & lengths (4) · Format & compare (2)
Frequently asked questions
How do I compare two texts for differences?
Paste the original into the first box and the changed version into the second. Every line that differs is marked as you type: removed text struck through, added text underlined, and the changed words highlighted inside each changed line. The board shows how similar the texts are and how many lines were changed, removed and added.
Why does the compare show a difference when the texts look the same?
Because a character that differs may print as nothing, or look like another. The usual ones are a no-break space for a space, a zero-width space, a tab, a curly apostrophe for a straight one, a byte order mark at the start of a file, or a Cyrillic letter that looks Latin. This compare names each one, with its code point and position.
What is the difference between comparing by line, by word and by character?
By line, any change makes the whole line different, and the compare then marks inside it either the words that changed or the characters. Words suit prose; characters suit codes, numbers and names, where one letter matters. Running text ignores line breaks and compares word by word, for paragraphs that were re-wrapped.
Can I ignore whitespace and capital letters when comparing text?
Yes, free. Ignore capital letters treats Call and call as the same. Ignore spacing treats two spaces as one, ignores spaces at the start and end of lines, and treats tabs and no-break spaces as spaces. There are also settings for blank lines, curly and straight quotes, and accents stored two ways. Your text is always shown unchanged.
How is the similarity percentage calculated?
As 2 times the characters the texts share, in order, divided by the characters in both, the ratio Python’s difflib uses. Line breaks are not counted and the Ignore settings apply. It is rounded down, so 100% means identical. The example is 2 × 113 ÷ 274, which is 82%.
Why does a moved paragraph show as deleted and added?
Because the comparison keeps order. It lines up the longest run of lines the texts share in the same order, and a moved line is outside that run, so it shows removed where it was and added where it is. Git and most diff tools do the same. The edit counter on this site recognises whole sentences that moved.
Can I compare two files?
Yes, plain-text ones: each box has its own Open a file button for .txt, .csv, .json, .md, code, logs and subtitles. The file is read on your device. The compare reports the file’s line endings and keeps its byte order mark, which it names. Word, PDF and spreadsheet files are not read; copy their text in.
Is this a plagiarism checker?
No. It compares the two texts you give it with each other, in order, character by character. A plagiarism checker searches one text against millions of others and finds matching passages anywhere. The similarity here says how much of one version survives in the other, not whether either was copied.
What happens to the text I compare?
Nothing leaves your device. The comparison runs in your browser, and both texts are kept in this browser’s storage so a reload does not lose them. Clear both deletes them. On a shared computer, clear the boxes when you finish, as you would close a document.
Related guides
Longer answers to the questions behind the numbers.
- Reference
Types of counters explained
Synchronous vs asynchronous, mod-N, ring and Johnson, industrial and PLC counters, plus mechanical and software counters.
- Counting
Why word counts differ between tools
The same sentence is 26 words to one counter and 39 to another. Four counting rules side by side, and how to meet a hard limit whichever one a form uses.