Embed this tool on your site
About this tool
Text Diff compares two versions of a text line by line and highlights the lines that differ, side by side, right in your browser. Paste the original on the left and the revised version on the right, click Compare, and changed lines are marked in each column with line numbers, along with counts of compared, changed, and unchanged lines. Spotting a single changed word buried in three paragraphs by eye is error-prone and slow; a line-aligned view makes edits obvious. Lines are aligned with a longest-common-subsequence diff, so inserting or deleting one line marks only that line instead of shifting everything after it, while reworded lines show the old and new versions side by side. Useful for comparing contract revisions, editing drafts, auditing copy changes, or checking that a find-and-replace touched only the intended lines. Nothing is uploaded.
Why use it
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 runs client-side when you click Compare or Swap, with no upload or server round-trip.
Privacy-First Design: Your document contents never leave your device — ideal for confidential contracts or drafts.
How to use
- Paste the original version of your text into the left panel labeled 'Original'.
- Paste the revised version into the right panel labeled 'Modified'.
- Click Compare; the diff result appears 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 it helps
- 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
InputOriginal: 'The price is $10.'
Modified: 'The price is $12.'
Expected result- The price is $10.
+ The price is $12.
InputOriginal: one paragraph
Modified: same paragraph plus a new second paragraph
Expected result [first paragraph unchanged]
+ [new second paragraph lines in green]
InputOriginal: Line A / Line B / Line C
Modified: Line A / Line C / Line B
Expected result 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, so note which column a line came from: the left holds removed lines and the right holds added lines.
Is there a character limit per text panel?⌄
There is no enforced limit. Matching lines at the start and end are skipped quickly, but if the changed block in the middle is very large (more than about 10 million line pairs, roughly 3,000 changed lines on each side), the tool stops aligning it and shows that block as all removed lines followed by all added lines.
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.
A LITTLE HELP. A LOT DONE.
Good tools.
Great flow.
Your shortcut to the everyday. Create, convert, calculate,
and get back to what you love.
✳
✳
✓ Free to use✓ No sign-up✓ 500+ possibilities