Text Diff
Compare two versions of any text or file, word by word.
Choose filess
or drop them anywhere on this page
Processed on your device — never uploaded
How to text diff
- Paste or type the two texts you want to compare — or drop two files.
- Choose word, line or character diff and side-by-side or unified view.
- Browse the differences. Export as HTML to share a formatted diff.
About this tool
A side-by-side word diff is the fastest way to see what changed between two versions of anything: a configuration file before and after an edit, a contract clause that came back slightly modified, a code snippet with one suspicious change. The line-level view is better when lines are long and the changes are whole-line additions or deletions — the classic git diff scenario.
Whitespace normalisation and case-insensitive comparison are worth understanding. Ignoring whitespace helps when comparing text that was pasted into two different editors with different indent conventions. Case insensitivity is useful for comparing SQL schemas or HTML attributes where capitalisation is arbitrary.
Questions
What is the difference between word and line diff?
Line diff (the traditional Unix diff output) treats each line as a unit — a change anywhere in a line marks the whole line as changed. Word diff breaks each line into tokens and shows which individual words changed. For prose text, code and configuration files, word diff is much easier to read because it shows exactly what moved.
Can I compare two files by dropping them in?
Yes. Drop the first file into the left panel and the second into the right, or add both at once and they are assigned automatically. The tool accepts any text-based format: .txt, .md, .json, .xml, .html, .css, .js, .py and similar.
Is there a size limit?
There is no imposed limit, but character diff on very large files is slow because the algorithm is O(n²) in the number of characters. For files over a few hundred kilobytes, line diff is much faster and usually more useful.