Text Diff
Compare two texts line-by-line
About Text Diff
Spotting the difference between two versions of a document by eye is error-prone and slow — a single changed word buried in three paragraphs can slip past even a careful reviewer. Text Diff solves this by computing a precise line-by-line comparison between an original and a revised text and highlighting every addition, deletion, and unchanged line with distinct color coding. Added lines appear in green, removed lines in red, and unmodified lines remain neutral, giving you an instant visual map of exactly what changed. This is the same kind of diff view used in code review tools like GitHub, brought to plain text without requiring any developer setup. Useful for comparing contract revisions, editing drafts, auditing copy changes, or verifying that a find-and-replace only touched the intended lines.
Why use Text Diff
Side-by-Side Comparison
View original and modified text simultaneously so context is never lost while reviewing changes.
Line-Level Changes Highlighted
Every changed line is pinpointed so you never miss an edit buried in a long document.
Added & Removed Lines Color-Coded
Green for additions, red for deletions — the same visual convention as GitHub code review.
No File Upload Required
Paste text directly — no need to save files or navigate upload dialogs.
Instant In-Browser Processing
The diff algorithm runs client-side, so results appear the moment you stop typing.
Privacy-First Design
Your document contents never leave your device — ideal for confidential contracts or drafts.
How to use Text Diff
- Paste the original version of your text into the left panel labeled 'Original'.
- Paste the revised version into the right panel labeled 'Modified'.
- The diff result appears instantly below, color-coded by change type.
- Green lines are additions present only in the revised version.
- Red lines are deletions present only in the original version.
- Unchanged lines appear without color to provide context around each edit.
When to use Text Diff
- When reviewing edits made to a contract, policy, or legal document.
- When comparing two drafts of a blog post to see what an editor changed.
- When verifying that a find-and-replace operation modified only the intended lines.
- When auditing copy changes between a content brief and the delivered article.
- When comparing two exported configuration files or environment variable lists.
- When proofreading translations by diffing the source against a back-translation.
Examples
Single word change
Input: Original: 'The price is $10.'
Modified: 'The price is $12.'
Output: - The price is $10.
+ The price is $12.
Added paragraph
Input: Original: one paragraph
Modified: same paragraph plus a new second paragraph
Output: [first paragraph unchanged]
+ [new second paragraph lines in green]
Reordered lines
Input: Original: Line A / Line B / Line C
Modified: Line A / Line C / Line B
Output: Line A
- Line B
Line C
+ Line B
Tips
- Normalize both texts to the same case using Case Converter before diffing if you only care about content changes, not capitalization.
- Use the diff tool after running Find & Replace to confirm only your intended substitutions were made.
- For long documents, copy just the changed section into both panels to get a focused, faster-to-read diff.
- Paste JSON into both panels after making edits — the line diff will immediately show which keys or values changed.
- When collaborating over email, paste the 'before' version into the left panel and the received 'after' version into the right to audit all changes.
Frequently Asked Questions
Does Text Diff work on entire documents or just short paragraphs?▾
It works on any amount of text you can paste — from a single sentence to a multi-page document. Very large inputs may cause a brief rendering delay as the diff algorithm processes all the lines.
Does it compare word-by-word or line-by-line?▾
The primary comparison is line-by-line, matching the convention in code diff tools. If two lines are similar but not identical, both the old and new versions are shown rather than highlighting just the changed word inline.
Can I use it to compare code as well as plain text?▾
Yes. The tool treats all input as plain text, so pasting code snippets, JSON, HTML, or any structured text works correctly. Indentation differences will appear as changed lines.
What do the colors mean?▾
Green lines exist only in the modified (right-side) text — they were added. Red lines exist only in the original (left-side) text — they were removed. Lines with no color appear in both versions unchanged.
Does it ignore trailing whitespace?▾
By default, trailing spaces are significant — a line with a trailing space differs from a line without. This is intentional to catch copy-paste whitespace artifacts that can cause issues in code or data files.
Can I export or copy the diff output?▾
You can select and copy the diff output area as plain text. The color formatting will not transfer to most destinations, but +/- line markers in the raw text indicate additions and removals.
Is there a character limit per text panel?▾
There is no enforced limit. Practical performance is excellent up to tens of thousands of lines; browser memory is the only real constraint.
Does it handle Windows line endings (CRLF) correctly?▾
Yes. CRLF line endings are normalized to LF before diffing, so text pasted from Windows Notepad or Windows-exported files will not produce false positives.
Glossary
- Diff
- Short for 'difference'. A diff is the computed set of changes between two versions of a text, listing added, removed, and unchanged lines.
- Hunk
- A contiguous block of changed lines in a diff output, typically surrounded by a few unchanged context lines.
- Context Lines
- Unchanged lines shown around a change in a diff to help the reader understand where in the document the change occurred.
- LCS (Longest Common Subsequence)
- The algorithm underlying most text diff tools. It finds the longest sequence of lines shared between both versions to determine what changed.
- Insertion
- A line present in the modified text but absent from the original — shown in green in a diff view.
- Deletion
- A line present in the original text but absent from the modified version — shown in red in a diff view.