# Text Similarity

> Compare two pieces of text and get a 0–1 similarity score plus a verdict (near-duplicate, similar, related, unrelated). Runs in your browser, nothing is uploaded.

URL: https://uttir.com/text-similarity
Categories: text-tools, data-tools
Privacy: Runs entirely on your device. The model is downloaded once to your browser cache, then runs offline. Nothing is sent to a server.

## About

This tool uses a local sentence-embedding model loaded into your browser on first use. It maps each text to a vector; the similarity score is the cosine similarity between the two vectors.

Unlike a string-similarity check (which only sees literal characters), this tool sees meaning. "I love this product" and "This is amazing" score 0.7+; "I love this product" and "I hate everything" score 0.1 or lower. Inference runs in your browser; the model weights are cached after the first download.

## How to use

1. **Paste both texts** — One per side. They can be any length — sentence, paragraph, or short article.
2. **Click Compare** — The first run downloads the model. After that it is cached and runs in a fraction of a second.
3. **Read the verdict** — A score from 0 to 1 plus a label: near-duplicate (≥0.95), similar (≥0.7), related (≥0.4), or unrelated (<0.4).

## Examples

### Two paraphrases

Same idea in different words.

Input:

```
A: "I love this product, it works great." / B: "This item is fantastic and functions perfectly."
```

Output:

```
0.78 — similar. The two sentences say the same thing in different words.
```

### Two unrelated topics

Different subjects entirely.

Input:

```
A: "I love this product, it works great." / B: "The train arrives at noon."
```

Output:

```
0.04 — unrelated. The two sentences have no shared meaning.
```

## FAQ

### What does the score mean?

A score from 0 to 1, where 1 means the model thinks the two texts mean the same thing and 0 means they are unrelated. Above 0.95 the texts are usually near-duplicates; above 0.7 they say the same thing in different words; above 0.4 they share a topic; below that they are different topics.

### How is this different from a string-similarity check?

String similarity (Levenshtein, Jaccard) compares literal characters. "I love this product" and "This is fantastic" score ~0 with strings. The semantic similarity is ~0.7 because the model understands that both are positive product reviews.

### Does it work in languages other than English?

The model is most accurate on English text. For other languages, scores will be lower than they should be. The tool still works, just with less reliable judgments.

## Related tools

- [Text Summarizer](https://uttir.com/text-summarizer) — Summarize long articles, blog posts, reports, or emails — entirely in your browser. Nothing is uploaded. The model runs locally on your device.
- [Sentiment Analyzer](https://uttir.com/sentiment-analyzer) — Detect the sentiment of any text — positive, negative, or neutral — using a local model. Perfect for content review, social posts, or feedback triage. Nothing is uploaded.
- [Word Counter](https://uttir.com/word-counter) — Count words, characters, sentences, and paragraphs in your text instantly.
- [Text Diff](https://uttir.com/text-diff) — Compare two texts line by line and see exactly what was added, removed, or kept.

---

For the full HTML page with the live tool, visit https://uttir.com/text-similarity.
This file is the markdown rendering at https://uttir.com/text-similarity.md. See https://uttir.com/llms.txt for a site-wide summary.
