Text Similarity
Compare two texts with Levenshtein distance, similarity percent, Jaccard overlap and a line diff.
How to use it
- Paste the first text into the Text A panel and the second into Text B.
- Press Compare (or Ctrl/Cmd + Enter inside either panel).
- Read the stats line: Levenshtein edit distance, similarity as a percentage of the longer text, and lines / words Jaccard for set overlap.
- Below, each line is marked: grey means both sides share it, red means only in A, green means only in B.
- Sample loads two near-identical pangram lists; Clear resets both panels.
Common use cases
- Detecting near-duplicates - see how far apart two versions of a paragraph really are before calling them the same.
- Reviewing edits - diff two drafts line by line to spot what was added, dropped or reworded.
- Comparing API responses - diff two JSON or log fragments to find the changed lines fast.
- Dataset dedup checks - rank candidate pairs by similarity before merging records.
Why it stays private
All distance and diff math runs in your browser. Drafts, contracts and internal notes never leave the page, so you can compare confidential text without uploading it anywhere.
FAQ
Q: What exactly does the similarity percentage mean?
A: It is 1 - Levenshtein distance / length of the longer text. One inserted or substituted character costs one edit, so short texts swing quickly while long ones move slowly.
Q: How are word tokens counted for the Jaccard figure? A: Text is lowercased and split into Latin words and digits plus runs of CJK characters. Jaccard divides shared tokens by the union of both sides, so 100 percent means identical token sets.
Q: Why do line marks show a line as "only in A" when I see a similar line on the right? A: Line diff is exact: a single changed character makes the two lines different, so both appear separately. The character-level similarity number still reflects how close they are.
Your data stays on this device
Text Similarity runs 100% locally. Everything you paste or drop is processed by your own browser and never transmitted. Nothing is stored on our servers — close the tab and it is gone.
Nothing you type is sent to a server, logged, or used for analytics. The page works even with your network disconnected after first load.