Peregrine falcon logoPeregrine Kit

Text Diff — Compare Text Online Free

Compare two pieces of text and see exactly what changed. Instantly. No sign-up required.

How to text diff

  1. 1Paste the original text in the left text area
  2. 2Paste the modified text in the right text area
  3. 3Click 'Compare' to generate the diff
  4. 4Review the highlighted differences: green for additions, red for removals

About This Tool

A text diff tool lets you compare two pieces of text and immediately see what has changed between them. Whether you are reviewing edits to an article, verifying changes in a configuration file, or comparing two versions of a legal document, this tool highlights every addition and removal so nothing slips through unnoticed.

This free text diff tool uses a line-by-line comparison powered by the Longest Common Subsequence (LCS) algorithm. Lines present only in the modified text are shown in green as additions, while lines present only in the original are shown in red as removals. Unchanged lines are displayed in their normal color for context. The result is a clear, easy-to-read summary of every difference between the two texts.

All comparison happens in your browser. Neither text is transmitted to a server, making this text diff tool safe for sensitive content like contracts, source code, and private communications. There are no file size limits, no account requirements, and no watermarks on the output.

Frequently Asked Questions

The tool splits both texts into lines and uses the Longest Common Subsequence (LCS) algorithm to find the optimal alignment. Lines that differ are marked as additions (green) or removals (red), while matching lines are shown without highlighting.

The comparison is line-based. If any part of a line changes, the entire line is marked as removed from the original and added in the modified version. This makes it easy to spot which lines were edited.

Yes. The tool handles large texts well, though very long documents (tens of thousands of lines) may take a moment to process since everything runs in your browser.

Yes, the comparison is exact. Differences in whitespace, including trailing spaces and indentation, will be flagged as changes. This is important for code comparisons where whitespace matters.

No. All processing happens locally in your browser. Your texts are never sent to any server and are not stored or logged in any way.

Related Tools