Text Diff Tool — Compare Two Texts and Highlight Differences Line by Line
Paste two versions of the same text — original on the left, revised on the right — click Compare, and every changed line is highlighted. Added lines appear in green, removed lines in red, unchanged lines in gray, with a summary showing the total number of changes. Uses an LCS (Longest Common Subsequence) algorithm, the same principle as Unix diff and Git diff. Supports up to 300 lines per side.
What Is Text Diff Tool?
Paste the original text in the left box and the revised version in the right box, then click Compare. Added lines (green), removed lines (red), and unchanged lines (gray) are shown with a summary count above the diff.
Original vs Revised text→Line-by-line diff with additions and deletions highlightedWhen to Use Text Diff Tool
Use to compare two versions of a document, code snippet, article, or any text — see exactly which lines changed, were added, or were removed.
The diff is line-by-line. For best results, paste text where each meaningful unit is on its own line. Identical lines are shown in gray; added lines in green; removed lines in red.
Who Should Use This Tool?
See exactly which sentences an editor changed, added, or removed between a draft and final version.
Compare two configuration files, API responses, or code snippets to find exactly what changed.
Identify line-level changes between two versions of a contract or terms document.
Compare a page's content before and after an update to confirm all intended changes were applied.
Key Use Cases
- →Document revision review — see exactly what changed between two versions of an article
- →Configuration file diffing — compare .env, nginx.conf, or package.json before and after updates
- →API response comparison — paste two JSON responses to find changed fields
- →Contract comparison — identify exact additions and deletions in legal documents
- →Content audit — compare a page from an archive against the live version
How to Use Text Diff Tool
- Paste or type your text into the Input Text box.
- The result appears instantly on the right.
- Click Copy to copy the output to your clipboard.
- Click Clear to reset and process new text.
Common Mistakes & Pro Tips
- !Expecting character-level diffs — this tool diffs at the line level; a one-character change shows the whole line as changed
- !Pasting very long documents — the tool supports up to 300 lines per side for performance reasons
- !Mixing line endings (CRLF vs LF) — Windows line endings can cause lines to appear different when they are not
Frequently Asked Questions
Everything you need to know about Text Diff Tool
What diff algorithm does this use?
+
This tool uses a line-level LCS (Longest Common Subsequence) algorithm — the same principle as Unix diff and Git diff. It finds the minimum number of line additions and removals needed to transform Text A into Text B.
Can I diff code?
+
Yes — paste any code snippet, configuration file, or script. The diff is line-by-line, so a one-character change in a line shows the entire line as changed. For character-level code diffs, use VS Code's built-in diff editor.