Diff Stats — Text Comparison Statistics

Compare two texts and get detailed statistics: lines, words, and characters added, removed, and unchanged — plus a similarity percentage.

ORIGINAL
MODIFIED

What Is Diff Stats?

Diff Stats is an online tool that analyzes the differences between two texts and produces a detailed statistical breakdown. Instead of showing a line-by-line diff, it gives you counts of lines added, lines removed, words changed, characters changed, and an overall similarity percentage — useful for code reviews, writing comparisons, and document version analysis.

How to Use Diff Stats

  1. Paste the original text into the left panel.
  2. Paste the modified text into the right panel.
  3. Click Compute Stats to generate the analysis.
  4. Review the similarity score, summary cards, and the line/word/character breakdown table.

Features

  • Similarity percentage — see how similar two texts are at a glance
  • Line-level statistics: added, removed, and unchanged lines
  • Word-level statistics: added, removed, and unchanged words
  • Character-level statistics: added, removed, and unchanged characters
  • Runs entirely in your browser — no data is sent to any server

Frequently Asked Questions

How is the similarity percentage calculated?

Similarity is calculated as the ratio of unchanged characters to the total characters in the longer text. A score of 100% means the texts are identical; 0% means they share no characters in common.

Is this tool useful for comparing code files?

Yes. Diff Stats works with any plain text, including source code. It is particularly useful when you want a quick numeric summary of how much a file changed between two versions without reading a full diff.

Is my text data private?

Yes — all processing happens in your browser using JavaScript. Nothing is uploaded to any server.