Text Diff

Compare two texts side by side and find differences. Line-by-line diff with added, removed, and unchanged highlighting.

All processing happens in your browser

What is a Text Diff?

A text diff (difference) is a comparison between two versions of text that highlights what was added, removed, or unchanged. Diff tools are essential in software development for code reviews, version control, and tracking changes in documents and configuration files.

Paste your original text on the left and the modified version on the right, then click Compare. The tool highlights added lines in green and removed lines in red, with line numbers for both versions. Load the sample to see the diff visualization in action before working with your own text.

Text diff comparison is commonly used for reviewing code changes before committing to Git, comparing configuration files between environments, auditing document revisions, validating data migrations, and verifying template modifications. It helps teams understand exactly what changed between two versions of any text content.

The tool uses the Longest Common Subsequence (LCS) algorithm, the same fundamental approach used by Git and other version control systems. It identifies the minimal set of changes needed to transform the original text into the modified version. Statistics show the count of added, removed, and unchanged lines for a quick summary of the differences.

FAQ

Related Tools