TASK
Compare two texts and show the differences
Diff two versions of a text to see insertions, deletions, and modifications at the line or character level.
- 1
Comparing two text versions reveals what changed — essential for reviewing edits, comparing configs, or debugging output differences. A diff shows added lines (+), removed lines (-), and unchanged context.
- 2 Text Diff →
Paste the original and modified text. The tool produces a unified diff with + and - markers, and optionally a side-by-side view.
- 3 text-diff
Use the chain to diff two texts and summarize the change statistics (lines added, removed, changed) in one pass.
Frequently asked questions
- Line diff vs character diff — which should I use?
- Line diff is standard for source code and most text — it shows which lines changed. Character (or word) diff is better for prose where changes within a line matter. Most tools default to line diff with intra-line highlighting.
- Why does my diff show every line as changed?
- This usually means line endings differ (CRLF vs LF) or there is trailing whitespace. Normalize line endings and trim whitespace before diffing to get a meaningful comparison.
Workflows that solve this
Learn more
Want to understand why?
How to Calculate Edit Distance
An intermediate-level guide covering edit-distance, levenshtein, nlp. Includes step-by-step instructions, common errors, troubleshooting tips, and security considerations for edit-distance. TUTORIAL
How to Calculate Levenshtein Distance
An intermediate-level guide covering levenshtein, edit-distance, algorithm. Includes step-by-step instructions, common errors, troubleshooting tips, and security considerations for levenshtein. TUTORIAL
Related tools
Text Diff
Compare two text blocks line by line using the LCS algorithm. Supports ignoring whitespace and case. Free, private, and 100% client-side. TOOL
Word Count
Count characters, words, lines, sentences, paragraphs, byte size, and estimate reading time. Free, private, and 100% client-side. TOOL
Sort & Unique
Sort lines alphabetically, numerically, by length, or naturally; deduplicate; reverse or shuffle. Free, private, and 100% client-side. TOOL