Text Compare in your browser

Compare two texts right in your browser and see exactly what was added and removed, by words, lines or characters, and nothing you paste is uploaded. It works with Hindi, Tamil and emoji too.

  • Texts never uploaded
  • Words, lines or characters
  • Hindi, Tamil and emoji
  • Free, no sign-up
Compare by

Getting ready…

Quick facts from our tests

Check it yourself: once the page has loaded, turn off Wi-Fi and mobile data, and Text Compare still works. Your browser's network panel (F12 on a computer) shows your texts are never sent. Google's ad code loads here too; our code never gives it your texts. How we prove it

How to compare two texts

  1. Put the two texts in

    Type, paste or open a text file in each box: the original first, the changed text second.

  2. Choose how to compare

    By words, lines or characters, and whether capital letters count. The changes show as you type.

  3. Read, copy or download

    Added text is underlined and removed text is struck through. Copy the changes or download them.

When this tool isn't the right fit

  • You need to compare two PDF files. Text Compare compares text that you paste or open, not PDF files. Compare PDF compares two PDF files.
  • You need to merge two sets of changes. The tool shows what differs between two texts. It does not merge changes or compare three texts.
  • Your texts are longer than 500,000 characters each. Compare them in smaller parts. Very different texts can also take long: the page gives up after 30 seconds, and Stop ends it sooner.
  • You want to compare bold, colours or tables, or a Word file. Only plain text is compared. Copy the text out of the file and paste it into the box.

Why compare texts here

More free tools

Private like this one: your files stay on your device.

Text Compare: the complete guide

What a comparison shows, words versus lines versus characters, Hindi and emoji, long texts, real results, privacy and tips.

In this guide
  1. What it does
  2. Step by step
  3. What it does exactly
  4. Real results
  5. Words, lines or characters
  6. Capitals and spaces
  7. Hindi, Tamil and emoji
  8. Opening files
  9. Long texts
  10. Privacy
  11. Tips
  12. Limits
  13. Terms explained

What a text comparison shows, and when you need one

Put two versions of a text side by side, the original and the changed one, and this tool shows exactly what changed: words that were added are underlined, words that were removed are struck through, and a line under the boxes counts the changes. It all happens in your browser: your texts are never uploaded, and nothing is kept.

Where it helps:

  • Two drafts of your own writing: an essay, a statement of purpose, a cover letter or a report, before and after edits.
  • A clause or a notice that was reworded: the old and the new terms of an agreement, a circular or a form's instructions.
  • Lists and scripts: two versions of a list of names, a config file or a piece of code, line by line.
  • Copied text: checking that text copied out of a PDF or a website matches the original exactly.
  • Feedback on edits: seeing what a teacher, an editor or a colleague changed in your text.

What it doesn't do: it compares characters, not meaning; it doesn't merge two versions into one; and it compares plain text only, so bold, colours and tables are left out. For two PDF files there is Compare PDF.

Step by step: comparing two texts

  1. Add the two texts. Put the original in the first box and the changed version in the second: type, paste with the Paste button or Ctrl+V (a long press on a phone), or open a text file into each box. Try a sample fills both with a short letter and its edited copy.
  2. Read the result. The comparison starts as soon as both boxes have text, and follows your typing.
  3. Choose how to compare: Words, Lines or Characters; the next section explains each.
  4. Set the choices: Ignore capital letters; in Words, Show changes in spaces and line breaks; in Lines, Ignore spaces at the ends of lines.
  5. Swap the texts if you pasted them the wrong way round; added and removed swap with them.
  6. Copy changes or Download to keep the result.

The line under the boxes says what was found, for the sample “4 changes: 6 words added and 2 words removed.”, or “The two texts are the same.” With only one box filled it says “Add text to the other box to see the differences.” Clear empties a box.

What the page does, exactly

The comparison is made by jsdiff, an open-source library (version 9.0.0, BSD 3-Clause licence, its licence) that runs in a background worker in your browser. These are the page's rules in full, and the same rules are checked by our tests.

PartThe ruleExample
The two textsThe original goes in the first box and the changed text in the second. Each box takes up to 500,000 characters, typed, pasted or opened from a text file. The comparison starts when both boxes have text and follows what you type, choose or swapThe original on the left and the changed text on the right; one above the other on a phone
WordsEach text is cut into words and marks (a full stop, a comma, the Hindi danda) at the boundaries of your browser's own Intl.Segmenter, or by our own rules of letters, vowel signs and digits where a browser has none. Spaces and line breaks are not counted as changes unless you tick "Show changes in spaces and line breaks". Words in both texts, in the same order, are left alone, and the rest is shown as added or removedI like tea and I like coffee: tea removed, coffee added
LinesEach line is compared as a whole: a line that differs by even one letter is shown as removed, and the new line as added. A last line without a line break is given one first, so a missing break at the very end is not a change. "Ignore spaces at the ends of lines" compares lines without the spaces and tabs before and after themA line b that becomes B is one line removed and one added
CharactersEach text is cut into letters as a reader sees them: a Hindi syllable with its vowel signs, or an emoji with its skin tone, is one. The changes can be as small as one letterkitten and sitting: k, e and g change, and the rest stays
Capital letters"Ignore capital letters" counts A and a as the same letter, in all three ways. Text that is the same except for capitals is then written as it is in the changed textHello World and hello world have no change
The shortest list of changesjsdiff finds the shortest list of additions and removals that turns the original into the changed text (the algorithm of Eugene Myers). A sentence that was moved shows as removed in one place and added in the otherOur tests checked the counts against a separate program that finds the fewest changes
The numbersA change is a place where text was added, removed or both. Added and removed are counted in words (by the rule of the Word Counter), lines (by line breaks) or characters (as the Character Counter counts them), whichever you compare by3 changes: 6 words added and 2 words removed.
How the changes lookAdded text is underlined and shaded green, and a line that was added has a + beside it. Removed text is struck through and shaded amber, and a line that was removed has a - beside it. The marks and the underline and strike-through do not rely on colour. A long stretch that is the same in both texts is folded into one line that says how much it holds, and at most 100,000 characters of the comparison are drawn… 275 unchanged words …
Copy and DownloadBy words or characters they take the whole text with the changes written in it: [-removed-] and {+added+}, as git's word diff writes them. By lines they take a unified diff with three lines around each change, the format that git and patch use, saved as changes.diff. They take everything, also what the page folded or did not drawI like [-tea-]{+coffee+}
TimeTexts that are very different, or very long, can take a long time to compare, so the work runs in the background with a Stop button, and the page gives up after 30 seconds and says soTwo unrelated texts of 10,000 words

What the rules don't decide: the page compares the characters of the texts, not what they mean. It doesn't know that two words mean the same, so a sentence that was rewritten shows as removed and added, and a paragraph that was moved shows as removed in one place and added in another. Formatting isn't compared, because only plain text is. And when two different shortest lists of changes exist, the page shows the one jsdiff finds. Words is the usual choice for writing, and Lines for lists and code.

Real results from our tests

We tested the Text Compare tool with headless Chromium 148, the open-source browser Chrome is built on, on a Windows laptop with an Intel Core i7-1185G7 and 32 GB of memory, on 13 October 2026. Other work was running on the laptop at the same time, so times vary a little from run to run: each time below is the middle one of 3 runs.

Comparing is quick when the texts are alike. In Words, two texts of 10,000 words (59,615 characters) with 1 word in 100 changed showed their changes 270 milliseconds after the last typing or pasting, and two texts of 50,000 words (298,907 characters) 522 milliseconds. In Characters, 298,463 characters with 50 letters changed took 364 milliseconds. In Lines, 50,000 words cut into about 5,000 lines took 2.6 seconds, because changing 1 word in 100 changes about half of the lines. Of each time, 0.15 second is the page waiting to see whether more typing follows, and 0.4 second when a text has more than 400,000 characters, so a burst of typing is compared once.

It takes longer the more the texts differ. The time depends on how different the texts are, not only on how long they are. Two unrelated texts of 3,000 words (17,892 characters) took 2.3 seconds, and two of 6,000 words (35,701 characters) took 8.9 seconds. Two unrelated texts of 16,000 words took more than the 30 seconds the page allows, so it stopped and said so. That is why the comparison runs in a background worker, with a Stop button that ends it at once, and why the page gives up after 30 seconds.

Checked against a second program. Python counted, with a longest-common-subsequence table, the fewest words, lines or characters that must be added and removed to turn one text into another, for 6,000 random pairs of texts: 2,021 pairs by words, 2,657 by lines and 1,322 by characters, some with capital letters ignored and some with the spaces at the ends of lines ignored. The page's comparison found exactly those numbers every time. Then 3,537 unified diffs of random lists of lines were applied to their originals with jsdiff's own applyPatch, and each gave the changed text back, and each was letter for letter the same as the one jsdiff's own createTwoFilesPatch writes. More than 25,000 checks on random texts made of English, Hindi and emoji pieces showed that the changed text can always be put together again from the parts shown, and that two texts that are the same show no change, with an Intl.Segmenter and without one.

Size and offline. On a first visit the page downloads about 0.11 MB for the tool: the page, its styles, its script, the comparison code (jsdiff and its worker) and the fonts, with Google's ad code not counted. In our test we switched the network off after the page had loaded and pressed Try a sample: the changes showed 0.2 seconds later or less in each of 15 runs, and 0.1 seconds later in 5 of them.

Phone-sized screen. We also ran every test on a phone-sized screen in Chromium (390 × 844 pixels, with touch). That is not a real phone. Every button and box was 44 pixels high or more, and the page did not scroll sideways.

Try it yourself: press "Try a sample" at the top of this page. It puts a short letter and its changed copy in the two boxes. In Words the line under the boxes reads 4 changes: 6 words added and 2 words removed., with 12 and function struck through, and 14, wedding, a Hindi word and "for your time" underlined. Choose Lines to see three lines removed and three added, and Characters to see the smallest changes.

Try the sample

Words, lines or characters: which to use

  • Words is for essays, letters and notices. A changed word stands out on its own, and a sentence that was reflowed onto a new line doesn't count as a change. In the sample, 12 and function are struck through, and 14, wedding, a Hindi word and “for your time” are underlined: 4 changes, 6 words added and 2 removed.
  • Lines is for lists, code, data and anything where each line is a unit. A changed line shows whole, as a removed line marked - followed by the added line marked +. In the sample, three lines are removed and three added.
  • Characters is for names, numbers, codes and short strings, to find the one letter that differs, such as Sharma and Sarma, or an account number with two digits swapped. A Hindi syllable with its vowel signs stays whole.

For a long text, a good habit is to compare by Lines first, to see which lines changed, and then paste just those lines and compare them by Words.

Text Compare after comparing the sample letter with its changed copy by words: the line saying 4 changes, 6 words added and 2 words removed, the letter with the removed words struck through and the added words underlined, and the Copy changes and Download buttons
Text Compare after comparing our sample letter with its changed copy.

Capital letters, spaces and line breaks

  • Ignore capital letters works in all three ways: Delhi and DELHI count as the same.
  • Show changes in spaces and line breaks (Words only) is off to begin with, so only the words themselves count. Tick it when spacing matters, such as in a poem or a formatted list.
  • Ignore spaces at the ends of lines (Lines only) skips the invisible spaces that editors often leave behind. A missing line break at the very end of a text isn't counted as a change either.

When two texts differ only in what these choices leave out, the line under the boxes says so instead of showing nothing: “No differences found with these choices. The texts differ only in what this comparison leaves out: capital letters, spaces and line breaks.” The choices never change your texts; they only decide what counts as a change.

Hindi, Tamil, Chinese and emoji

To find where words and letters begin and end, the page uses your browser's own Intl.Segmenter, which knows the rules of every script. So a Hindi or Tamil word stays whole in Words, a syllable with its vowel signs stays whole in Characters, and an emoji with a skin tone counts as one letter. The full stop of Hindi, the danda (।), is a mark of its own.

This matters more than it sounds. Word rules written with English in mind split a Devanagari or Tamil word into pieces and mark half a word as changed; the comparison code this page uses did exactly that in our first tests, before we gave it the browser's rules. In a browser without Intl.Segmenter, the page uses its own rules of letters, vowel signs and digits, so Hindi and Tamil words still stay whole. The exact boundaries come from the browser, so they can differ a little between browsers.

Opening text files and copying text out of other files

Each box has its own Open a text file, and you can drop a file on the box you want. Files up to 500,000 characters are read: UTF-8 as it is, UTF-16 with a byte order mark, and an older Windows file that isn't UTF-8 as Windows-1252, with a note: “This file isn't saved as UTF-8, so it was read as Windows-1252. If letters look wrong, save it as UTF-8 and add it again.”

Word, PDF and picture files aren't opened: “Only text files (.txt and similar) can be opened here. For a Word or PDF file, copy its text and paste it into the box.” Their formatting wouldn't be compared anyway. For two PDF files, Compare PDF opens them directly, marks the text changes on the pages side by side, and can also compare how the pages look.

Long texts, big differences and Stop

Each box takes up to 500,000 characters, about 80,000 words of English. The comparison runs in a background worker, so the page stays usable while it works; if it takes more than about 0.4 second, the page shows “Comparing” with the number of characters, and a Stop button that ends it at once.

The time depends far more on how different the texts are than on how long they are. In our test, two texts of 50,000 words with 1 word in 100 changed were compared in about half a second, but two unrelated texts of 6,000 words took 8.9 seconds. The page gives up after 30 seconds and says so: “These two texts are too different to compare in 30 seconds, so the page stopped. Try comparing by lines, or compare smaller parts.”

Long stretches that are the same are folded, such as “... 275 unchanged words ...”, so the changes stay easy to find, and at most 100,000 characters of the comparison are drawn on screen. Copy changes and Download always take all of it.

Private: your texts stay on your device

Your texts never leave your device. The tool runs inside your browser and has no upload step: it never sends the texts you type, paste or open anywhere, and it does not save them, so closing the page forgets them. The page's Content Security Policy lets it contact only this site and Google's ad service, which pays for the site; our code never gives your texts to the ad code. You can check it yourself in your browser's network panel (F12 on a computer): comparing adds no request that carries your texts.

What people compare is often personal: drafts of an application, a contract before signing, a letter, a statement of purpose. A comparison site that works on a server receives everything you paste; here the comparison runs in your own browser, and nothing is kept once you close the page. It works offline too once the page has loaded: in our test we switched the network off and pressed Try a sample, and the changes showed 0.2 seconds later or less in each of 15 runs. Read our privacy policy and how we prove your files are never uploaded.

Text Compare after comparing the sample letter with its changed copy by words: the line saying 4 changes, 6 words added and 2 words removed, the letter with the removed words struck through and the added words underlined, and the Copy changes and Download buttons, at a phone's size with the internet switched off by our test, between our test's bands that read "Internet switched off" and "Nothing uploaded: 0 requests sent data"
Proof from our testOn 9 November 2026, our test opened Text Compare at a phone's size, switched the internet off and ran it on its built-in sample. It finished with no connection, and none of the page's 19 requests sent any data.How we test, and how to check it yourself

Tips

  • Words for writing, Lines for lists and code, Characters for names and numbers.
  • Old text first. Added and removed are read from the original to the changed text; Swap fixes a mix-up.
  • Only the style changed? Tick Ignore capital letters.
  • A long document: compare by Lines first, then compare the changed lines by Words.
  • Sharing the result? Copy changes gives plain text that pastes into an email or a chat.
  • Keep your own copies. The page forgets both texts when you close it.
  • Counting words too? The Word Counter counts words, characters and reading time.
  • Two files exactly the same? For a byte-for-byte check of whole files, compare their hashes with Hash Generator. To compare two lists whatever their order, sort both first with Sort Lines, and tidy their spaces with Remove Extra Spaces.

Limits

  • Plain text only. The page compares typed, pasted or opened text. It does not open Word, PDF or picture files and does not compare bold, colours or tables. For two PDF files, use Compare PDF.
  • 500,000 characters in each box about 500 KB of English text. A longer paste or file is not added, and the page says so.
  • Two texts, no merging. It shows what differs between two texts. It does not merge changes or compare three texts.
  • Very different texts can take long. The page gives up after 30 seconds. Stop ends the work sooner.
  • Not the meaning. It compares letters and words, not what they mean: a rewritten sentence shows as removed and added.
  • Not saved. The texts and the changes are forgotten when you close the page.
  • Browsers. We tested only in Chromium, the engine behind Chrome and Edge, with computer and phone-sized screens. We did not test on real phones, in Safari or in Firefox, so we cannot promise how they behave.

Terms explained

Diff
The list of differences between two texts; also the name of the classic tool that makes one.
Unified diff
The plain-text format of git and patch: a header of two lines, then parts starting with @@, with - before removed lines and + before added ones.
Word diff
A diff that compares words, written with [-removed-] and {+added+} marks.
Added and removed
Text that is only in the changed text is added; text that is only in the original is removed.
Intl.Segmenter
The browser's own tool for finding where words and letters begin and end, in any language.
Unicode
The standard that gives every letter of every language, and every emoji, its own code.
Worker
A background program in the browser, so a long comparison doesn't freeze the page and can be stopped.

Frequently asked questions

Is Text Compare free?

Yes. There is no sign-up, no watermark and no limit on how often you use it. Ads from Google help pay for the site, and they are kept apart from the tool.

Are my texts uploaded anywhere?

No. The tool has no upload step: it never sends your texts anywhere, and it doesn't save them. Google's ad code loads on the page, and our code never gives it your texts. You can check in your browser's network panel (F12 on a computer).

How do I compare two texts?

Put the original in the first box and the changed text in the second. The changes show as soon as both boxes have text: added text underlined, removed text struck through. Choose Words, Lines or Characters for the size of a change.

What is the difference between Words, Lines and Characters?

The size of a change. Words shows changed words, best for writing; Lines shows whole changed lines, best for lists and code; Characters shows single letters, best for names and numbers.

Does it work for Hindi, Tamil and emoji?

Yes. Word and letter boundaries come from the browser's own rules for every script, so a Hindi or Tamil word stays whole, a syllable with its vowel signs stays whole, and an emoji counts as one letter.

What do the underline, the strike-through and the colours mean?

Underlined text with a green tint was added; struck-through text with an amber tint was removed. In Lines, a + or - beside each row says the same, so the meaning never rests on colour alone.

Can I ignore capital letters or extra spaces?

Yes. Ignore capital letters works in all three ways. In Words, spaces and line breaks don't count unless you tick Show changes in spaces and line breaks. In Lines, you can ignore spaces at the ends of lines.

How much text can I compare?

Up to 500,000 characters in each box. Similar texts are quick: two texts of 50,000 words with 1 word in 100 changed took about half a second in our test.

Why is my comparison slow, and what does Stop do?

The time grows with how different the texts are: two unrelated texts of 6,000 words took 8.9 seconds. Stop ends the work at once, and the page gives up by itself after 30 seconds. Compare by lines, or in smaller parts.

Can I compare Word documents or PDF files?

Not directly here: copy the text out of the Word file and paste it in; formatting isn't compared. For two PDF files, use Compare PDF, which opens them directly.

What does Download save, and what is a unified diff?

In Lines it saves changes.diff, a unified diff, the format git and patch use, with three lines around each change. In Words and Characters it saves changes.txt, with [-removed-] and {+added+} marks.

Why does a moved sentence show as removed and added?

The page finds the shortest list of additions and removals that turns one text into the other, and a move is a removal in one place and an addition in another. It doesn't detect moves as moves.

Does it work offline?

Yes, once the page has loaded. In our test we switched the network off and pressed Try a sample, and the changes showed 0.2 seconds later or less in each of 15 runs.

Does it save or remember my texts?

No. The tool doesn't save them, so closing or reloading the page forgets them.

Is this the same as comparing in Word, or git diff?

The idea is the same, but this compares plain text only. Lines downloads git's unified diff format, and Words uses the same markers as git's word diff. It doesn't merge changes.

By the PDFGuild team · Updated · How we test