Text Diff

Compare two texts and highlight differences line by line or word by word.

About Text Comparison

Text comparison is essential for developers reviewing code changes, writers tracking document revisions, and anyone who needs to spot differences between two versions of text. This tool uses the LCS (Longest Common Subsequence) algorithm — the same approach used by professional diff tools like Git — to compute the minimal set of changes between two inputs. You can compare line-by-line for structured content or word-by-word for prose. All processing runs entirely in your browser with no data sent to external servers.

Related Tools

Frequently Asked Questions

How does the text diff tool compare texts?
It uses an LCS (Longest Common Subsequence) algorithm to find the optimal alignment between two texts, then highlights additions, deletions, and unchanged content.
What is the difference between line and word diff modes?
Line-by-line mode compares entire lines as units — ideal for code and structured text. Word-by-word mode compares individual words, making it easier to spot small changes within paragraphs.
Is my text sent to a server?
No. All comparison processing happens entirely in your browser using JavaScript. Your text never leaves your device.