Compare Two Texts Online

Original text
Changed text
Paste text in both boxes to compare
Paste text in both boxes and click Compare

Free Online Text Diff Tool

Paste two versions of any text and click Compare. Added lines are highlighted in green, removed lines in red, and unchanged lines are shown normally. The tool shows how many lines were added and removed so you can assess the scope of changes at a glance.

What is a diff checker?

A diff checker compares two pieces of text and identifies what changed between them. The term "diff" comes from the Unix diff command, which has been a standard developer tool since the 1970s. Online diff tools make the same capability available to everyone — writers, editors, teachers, developers, and anyone who needs to track changes between two versions of a document.

Common uses for text comparison

Writers use a diff tool to compare a draft with a revised version or to check what an editor changed. Developers use it to review configuration file changes, compare API responses, or spot regressions in generated output. Students use it to check if their essay has been edited. Legal and compliance teams use it to track contract revisions. SEO professionals use it to check that a page's content changed as intended after an update.

How the line-by-line diff works

This tool uses a longest common subsequence algorithm to identify the maximal set of lines shared between both texts. Lines in the changed text that are not part of the common sequence are marked as added; lines in the original text that are not part of it are marked as removed. Lines that appear in both are shown without highlighting.

Frequently asked questions

How does the diff tool work?
It compares both texts line by line. Lines only in the second (changed) text are shown in green. Lines only in the first (original) text are shown in red. Lines in both are shown normally.
Can I compare documents character by character?
This tool compares line by line, which is the most readable format for prose and code. Character-level diffs are most useful for very short strings where line-level changes are too coarse.
Does the tool save my text?
No. All comparison happens in your browser. Your text is never sent to a server or stored anywhere.
Is there a text length limit?
No hard limit. Very large texts (thousands of lines) may take a moment on older devices.