Compare two texts and highlight differences
Paste the original text, a blank line, then the changed text. The tool computes a line-by-line diff and highlights what was added and removed, with a summary count. Useful for contracts, code, configs and essays.
How to use the Text Diff Checker
- Paste the ORIGINAL text.
- Add a blank line (or a line of --- or ===).
- Paste the CHANGED text after it.
- Removed lines show in red, added lines in green; the summary counts them.
How the comparison works
The two texts are split into lines and compared with a longest-common-subsequence algorithm, the same family of algorithm behind git diff. Lines that appear in both texts in the same order are treated as unchanged; everything else is marked as removed (present only in the original) or added (present only in the changed text). A modified line therefore appears as one removal followed by one addition.
Whitespace
With "Ignore leading/trailing whitespace" on, lines that differ only by indentation or trailing spaces are treated as equal, which suppresses noise when comparing code copied from different editors. Turn it off when whitespace is meaningful, for example in YAML or Python.
Reading the output
The summary gives the number of added, removed and unchanged lines. In the coloured view, a red line with a leading - was removed and a green line with + was added. The plain-text output uses the same markers and can be pasted into an email or ticket.
Limits
The algorithm is quadratic in the number of lines, which is fine for documents of a few thousand lines but slow beyond roughly 20,000; the tool refuses larger inputs rather than freezing your browser.
Frequently asked questions
Can I compare two files?
Open each file, copy the text and paste both here separated by a blank line. A file-upload diff is planned.
Does it show word-level changes?
Currently the diff is line-based, matching git. Word-level highlighting is planned.
Is my text uploaded?
No. The comparison runs in your browser.
Privacy
This tool runs entirely inside your browser using WebAssembly and the Canvas/File APIs. Your files are never uploaded to ToolFlint or any third party; you can verify this in your browser's network tab or by switching to airplane mode after the page loads. Read how we process files.
Last updated 2026-09-23.