Text Similarity Checker

Result

Compare two texts and get a similarity percentage, edit distance, shared words and cosine match. Good for comparing drafts, rewrites and short passages.

“How similar are these two pieces of text?” sounds like a simple question and turns out to have several honest answers. This tool gives you five of them for the price of one paste, so you can see which describes the difference you care about.

Put the first text in the box, then a line containing only three dashes (—), then the second text.

The numbers

Similarity is built on the edit distance. It counts the smallest number of single-character changes (inserts, deletions and replacements) needed to turn the first text into the second, divides that by the length of the longer text, and subtracts from 100 percent. Two identical texts score 100. “kitten” and “sitting” differ by three edits over seven characters, which gives about 57 percent. This is the Levenshtein distance, named after the Soviet mathematician who described it in 1965.

Edit distance is the raw count of changes. It is often more informative than the percentage for short strings, such as comparing two names or product codes: a distance of 1 means one typo apart.

Shared words shows how many of the different words appear in both texts, out of all the different words used by either. Word overlap is that as a percentage, a measure known as Jaccard similarity. It ignores order and repeats, so it tells you whether the texts talk about the same things.

Word cosine match treats each text as a list of word counts and measures the angle between them. Unlike word overlap it takes repeats into account, so a text that says “cat” ten times differs from one that says it once. It is the idea behind many search engines’ relevance measures.

Which to trust

For near-duplicates, where one text is an edit of the other, the character similarity is the most useful. For texts that cover the same material in different words, character similarity will be low and word overlap and cosine will say more. Rewrites that move paragraphs around will punish the edit distance, since order matters to it, while the word-based measures barely notice.

Honest limitations

This is not a plagiarism checker. It compares two texts you supply and does not search the web or a database, and similarity in words is not evidence of copying: any two texts on the same subject will share words. Each text can be up to 4,000 characters, because the edit distance calculation slows quickly beyond that. For long documents, compare a representative section.

Case is ignored by default. Untick that if capitals matter.

If you want to see exactly what changed rather than a number, the text diff checker shows each added and removed word. Two lists are better compared with compare two lists, and the word frequency counter shows how often each word appears in a single text.

Frequently asked questions

Can this tell me if text was plagiarised?

No. It compares only the two texts you paste and does not search any other source. High similarity between two texts is a clue worth following up, but it is not proof of copying.

Why is my character similarity low when the texts mean the same thing?

Character similarity measures how much the letters match, not the meaning. Two texts that say the same thing in different words will score low, and the word-based measures may be a better guide.

What is the length limit?

Up to 4,000 characters per text. Beyond that the comparison would be too slow to run in a browser.