Text Diff Tool
Compare two texts and see differences highlighted line by line. Added lines in green, removed in red. Runs entirely in your browser.
Compare two texts and see differences highlighted line by line. Added lines in green, removed in red. Runs entirely in your browser.
The tool uses the Longest Common Subsequence (LCS) algorithm to find which lines are shared between the two texts. It then classifies every line as added (only in the modified text), removed (only in the original), or unchanged (present in both). The comparison runs entirely in your browser — no text is ever sent to a server.
Lines prefixed with + appear only in the modified text (added). Lines prefixed with - appear only in the original (removed). Lines with no prefix are identical in both versions. The "Copy unified diff" button exports the result in standard unified-diff format, compatible with git apply and most diff viewers.
Common use cases include: comparing two versions of a document or config file, reviewing changes in code snippets, spotting typos introduced between drafts, verifying that a translation matches the original structure, or auditing changes between contract revisions.
It uses the Longest Common Subsequence (LCS) algorithm to identify shared lines, then marks lines unique to the original as removed (red) and lines unique to the modified version as added (green). Unchanged lines are shown in grey.
No. The comparison runs entirely in your browser. Your text never leaves your device.
The tool handles up to 600 lines per text for smooth browser performance. For larger files, a command-line tool like diff or git diff is recommended.
Unified diff is a standard text format showing changes with + and - prefixes. It is the format used by git diff and can be applied to files with patch or git apply.