What is a diff checker?
A diff checker compares two pieces of text and shows the differences between them. Writers use it to see what an editor changed, lawyers to compare contract drafts, developers to compare configuration files and code snippets, and students to check revisions of an essay. Finding changes by eye is slow and unreliable, especially when only a word or a comma has moved.
This tool runs entirely in your browser, so you can safely compare confidential documents. Nothing is uploaded or stored.
How to use the text diff tool
- Paste the original text on the left and the changed version on the right.
- Choose to compare by line (best for code and lists), word (best for prose) or character (best for short strings).
- Optionally ignore case or ignore whitespace so formatting-only changes are not flagged.
- Review the highlighted result: additions are green, removals are red and struck through. Copy the diff to share it.
How the comparison works
The tool uses the Myers difference algorithm, the same approach behind git diff and many other version control tools. It finds the shortest possible set of insertions and deletions that turns the original into the changed text, which keeps the highlighted changes as small and readable as possible.
In line mode a changed line appears as one removed line followed by one added line. Switch to word mode to see exactly which words within the line changed.
Example
Comparing “jumps over the lazy dog” with “leaps over the lazy dog” by line shows one line removed and one added. Compared by word, only “jumps” is marked as removed and “leaps” as added, while the other words stay unchanged.
More worked examples
Contract edit: comparing two versions of a clause by word shows that only “30 days” changed to “45 days”, even though the whole line looks different by eye.
Common mistakes to avoid
- Comparing by line for prose. Word mode shows exactly which words changed within long lines.
- Flagging formatting noise. Tick “ignore whitespace” when indentation or spacing changed.
- Diffing unformatted JSON. Format both sides first with the JSON formatter so the structure lines up.
Sources and methodology
The calculations on this page follow these published standards and references. The code is covered by automated tests against known values.