🆚 Text Diff Checker
Compare two texts and see added, removed and unchanged parts by line, word or character, locally.
📋 Diff result
🔐 The diff is computed in your browser. A small open-source diff library is loaded from jsDelivr; your texts are never uploaded.
How to use this tool
Overview
Text Diff Checker compares two texts and highlights every difference: additions in green, deletions in red, unchanged content untouched. Switch between line-by-line comparison for documents and logs, word-level comparison for prose, and character-level comparison to catch typos and punctuation. Live statistics count added, removed and unchanged units, and the copy button produces a unified + / − diff list you can paste anywhere. Everything is computed locally in your browser. Only a small open-source diff library is fetched from a CDN, and your texts themselves are never uploaded.How text comparison works
The two texts are split into the chosen unit, lines, words or characters, and an edit-distance algorithm computes the shortest sequence of insertions and deletions that turns one into the other. The result is mapped back onto the original text so changes appear inline: green for additions, red for removals, untouched text left intact. Line mode suits code and logs, word mode suits prose and contracts, and character mode catches invisible differences such as trailing spaces, smart quotes or a swapped comma. The unified + / − output can be copied into tickets, reviews or commit messages.
Processing details and limits
| Property | Text diff checker behavior |
|---|---|
| Comparison modes | Line, word and character level |
| Algorithm | Edit-distance diff, inline highlighting |
| Statistics | Added, removed and unchanged unit counts |
| Export | Copy as unified + / − diff list |
| Processing | 100% client-side; texts never uploaded |
| Cost | Free, no account, no character limit |
Privacy: text stays in the browser
Diffing often involves drafts, contracts or log excerpts. Only a small open-source diff library is fetched; the texts themselves are processed in page memory and never transmitted, stored or logged, and the tool works offline after loading.
Comparing text effectively
- Use character mode to diagnose "identical" strings that still fail a comparison.
- Use line mode for configuration files and stack traces.
- Ignore whitespace differences deliberately, trailing spaces are the usual culprit.
- Copy the unified diff instead of screenshots when reporting changes.
- For three-way merges, compare pairs sequentially.
Related: browse the text tools for counters, case conversion and markdown editing.
Diff algorithms: line, word and character granularity
A diff tool compares two texts and reports what changed, but the useful output depends on the comparison unit. Line-level diff is the default for code and configuration because it maps to how files are edited and reviewed; a single changed character inside a line marks the whole line as modified. Word-level diff is better for prose, contracts and translations, where a reviewer wants to see that one word changed inside an otherwise identical sentence. Character-level diff is the most precise and the hardest to read, so it is usually reserved for short strings such as identifiers or hashes. Most implementations use a longest-common-subsequence or Myers algorithm, which finds the smallest set of insertions and deletions that turns one text into the other; it is deterministic and does not try to be clever about meaning. Three options change the result more than the algorithm does. Ignoring whitespace prevents indentation changes from drowning real edits; ignoring case treats Upper and upper as equal; ignoring blank lines keeps reformatting noise out of the report. When comparing versions of a document, decide what the report is for, review, audit or merge, and pick granularity and options accordingly. The comparison runs locally in your browser, so drafts, contracts and credentials never leave your device.
Frequently asked questions
What is a text diff? +
A diff shows what changed between two versions of a text: added parts are highlighted in green, removed parts in red, and everything else is unchanged. The Text Diff Checker supports line, word and character granularity.
Which comparison mode should I use? +
Use line mode for documents and logs, word mode for prose edits, and character mode to catch typos and punctuation changes.
Are my texts uploaded? +
No. The comparison runs entirely in your browser. Only a small open-source diff library is fetched from the jsDelivr CDN; your content is never transmitted.
Can I copy the result? +
Yes, press the copy button to get a unified diff list with + for added and - for removed content.