Compare two texts side by side — additions, deletions, and changes highlighted.
Text diffing compares two texts and identifies what's been added, removed, or changed. Under the hood, most diff algorithms use a variant of the Longest Common Subsequence (LCS) problem — finding the longest sequence of lines that appear in both texts in order.
Lines present in only the first text are marked as deletions (red), lines present in only the second text are additions (green), and matching lines are unchanged. This is the same approach used by git diff, GitHub pull requests, and code review tools.
Diff checking is essential for debugging configuration changes, comparing API responses before and after a code change, reviewing document edits, and verifying that a minifier or formatter didn't alter your code's behavior. This tool runs entirely in your browser with zero server interaction.
This tool in other languages:
Français:
Comparateur de texte
Español:
Comparador de texto
Deutsch:
Text-Vergleichstool
Português:
Comparador de texto
日本語:
テキスト差分チェッカー
中文:
文本差异比较工具
한국어:
텍스트 차이 비교기
العربية:
أداة مقارنة النصوص
Paste the first text in the left panel and the second text in the right panel, then click Compare. Added lines appear in green, removed lines in red, and changed sections are highlighted. Use Swap to flip the two sides instantly.
Line diff compares whole lines — good for comparing code, configs, and logs. Character diff (or word diff) highlights exactly which characters changed within a line — better for prose, short strings, or copy edits. This tool focuses on line-level diff with inline highlighting for clarity.
Yes. Paste the contents of each file into the two panels. The diff will highlight added, removed, and changed lines — useful for code review, catching accidental changes, or comparing config files between environments.
With DeskTools, yes — everything runs client-side in your browser. The text never leaves your device and isn't sent to any server. You can safely compare sensitive code, private documents, or confidential logs.
Trailing spaces, tab-vs-space differences, and line ending changes (CRLF vs LF) all count as differences. If you're seeing unexpected changes, check if the texts have different whitespace conventions — normalizing line endings before pasting often cleans up the diff.