Text Diff Checker

Paste two texts and instantly see every difference โ€” added, removed, and modified lines with word-level highlighting

Paste text in both boxes to see differences

About This Tool

Spotting differences between two versions of text by reading them side by side is slow and error-prone. This diff checker does it instantly โ€” paste the original and modified text, and every change is highlighted in color. Added lines show in green, removed lines in red, and modified lines show exactly which words changed within the line. The summary tells you how many lines were added, removed, and left unchanged so you can gauge the scope of changes at a glance. Use it for comparing drafts of an article, checking config file changes, reviewing code edits, verifying translations, or any time you need to answer "what changed between these two versions?"

How to Use

1. Paste the original text in the left (top) box 2. Paste the modified text in the right (bottom) box 3. Differences are highlighted automatically as you type 4. Green = added, Red = removed, highlighted words = specific changes 5. Use options to ignore case or trim whitespace 6. Click "Swap" to reverse the comparison direction

Formula

Diff is computed using the Longest Common Subsequence (LCS) algorithm. Modified lines are detected by pairing adjacent remove/add blocks. Word-level changes are highlighted within modified lines.

Frequently Asked Questions

How does a text diff checker work?
A diff checker splits both texts into lines and uses the Longest Common Subsequence (LCS) algorithm to find the best alignment. Lines present in both texts are marked as unchanged. Lines only in the original are marked as removed, and lines only in the modified version are marked as added. For modified lines, the tool further compares individual words to highlight exactly what changed.
What do the colors mean?
Green lines (+) were added in the modified text. Red lines (โˆ’) were removed from the original. Lines with highlighted words inside them were modified โ€” the highlights show exactly which words changed. Lines with no color are identical in both versions.
Can I compare code with this tool?
Yes. The diff checker works with any plain text โ€” code, prose, config files, CSV data, JSON, etc. It compares line by line, which is exactly how code version control (Git) works. For best results with code, leave 'Trim whitespace' off so indentation changes are visible.
What is the difference between diff and compare?
They mean the same thing in this context. 'Diff' (short for difference) is the technical term used in programming and version control. 'Compare' is the everyday word. Both refer to finding what changed between two versions of text.
Does this tool store my text?
No. Everything runs in your browser. Your text is never sent to a server. The comparison is computed entirely client-side using JavaScript. When you close the page, the text is gone.
Can I compare very large texts?
The tool works well with texts up to several thousand lines. For very large files (over 10,000 lines), the comparison may take a moment. The algorithm optimizes by skipping identical prefixes and suffixes before computing the diff on the changed section.
What does 'Ignore case' do?
When enabled, 'Hello' and 'hello' are treated as identical. This is useful when you want to focus on content changes and don't care about capitalization differences. The original text is still displayed with its original case โ€” only the comparison logic is affected.