Text Diff

Compare two blocks of text side by side and see every added, removed or changed line highlighted. 100% in-browser diff.

Runs entirely in your browser — no uploads

About this tool

Text Diff compares two versions line-by-line using a longest-common-subsequence algorithm, marking additions in green and deletions in red, with optional whitespace-insensitive mode.

Sensitive documents stay safe: both texts are compared entirely within your browser’s memory.

How to use it

Paste the older version into the left box and the newer version into the right box. The diff highlights added lines in green and removed lines in red, with unchanged lines left plain so the shape of the change stands out. If the only differences are indentation or trailing spaces, enable the ignore-whitespace option to hide that noise and focus on the real edits.

How changes are found

The comparison uses a longest-common-subsequence algorithm, the same family of approach used by version-control tools. Rather than a naive line-by-line scan, it finds the smallest set of insertions and deletions that turns one text into the other, then groups nearby edits into readable blocks. That is why moving a paragraph can show up as one deletion plus one addition rather than dozens of tiny changes.

When it is useful

Diff two drafts of an article before accepting edits, check what a configuration change actually altered, compare an API response from before and after a deployment, or review a piece of code someone pasted into a chat. It also works for non-code text: specifications, meeting notes, and translation strings all benefit from seeing exactly what moved.

Honest limitations

Comparison is line-based, so a single character changed inside a long sentence highlights the whole line. Very long or completely unrelated inputs produce a large diff that takes longer to compute; a few thousand lines is comfortable. The tool compares only what you paste — it has no file history and does not integrate with Git. If you need word-level or character-level diffs, a dedicated code diff tool is a better fit.

Free · no account No file uploads Works on mobile

FAQ

How are changes matched?
A dynamic-programming LCS finds the minimal edit script, then groups consecutive edits into readable hunks.
What does “ignore whitespace” do?
Lines differing only in spaces or indentation are treated as equal — useful for comparing reformatted code.
Can I compare large files?
Comfortably up to a few thousand lines. Extremely different texts produce longer diffs that take slightly longer to compute.