What this text diff does
This English-language text diff tool compares two blocks of text line-by-line using an LCS (Longest Common Subsequence) algorithm — the same approach behind git diff. Paste your original on the left and the revised version on the right; added lines appear green, removed lines appear red, and unchanged lines stay neutral. The summary counts tell you exactly how many lines changed at a glance. Unlike many diff checker online sites that POST your content to a remote server, this tool is 100% client-side — your data never leaves your browser. No uploads, no tracking, no server logs. That makes it safe for contracts, NDAs, internal config files, or any sensitive draft you'd rather not expose. The Oxford English Dictionary tracks roughly 600,000 word forms, yet most documents differ by far fewer; a line-by-line diff surfaces exactly those changes without noise.
Features
- LCS-based diffing. Uses a Longest Common Subsequence algorithm so moved or reordered blocks are handled correctly — not just naive line matching that would flag every line as changed.
- Color-coded output. Added lines are highlighted green, removed lines red, and unchanged lines neutral, so you can scan a long diff in seconds without reading every character.
- Change summary. A concise count of added, removed, and unchanged lines appears above the diff, giving you a quick sense of how much actually changed before you read the detail.
- Privacy by design. All computation runs locally in your browser. No text is sent to any server — making this the right choice for source code, legal documents, and configuration files.
- Swap and clear controls. One click swaps Original and Changed so you can reverse the direction of the comparison. Clear both resets both panels when you're ready to start a new check.
- No install, no account. Open the page and start comparing. Works on any modern browser. If you also need to normalize casing before comparing, the [case converter](/en/case-converter/) can prep your text first.
How to use the text diff
Paste your texts, read the color-coded result. For terminal users, the equivalent command is diff -u old.txt new.txt or git diff --no-index file1 file2.
- Paste the original. Put the earlier or baseline version of your text into the left (Original) panel.
- Paste the changed version. Put the newer or revised version into the right (Changed) panel. The diff updates automatically.
- Read the diff. Green lines were added, red lines were removed. Unchanged lines are shown without highlighting. The summary above the diff gives you total counts.
- Swap if needed. Click Swap to reverse Original and Changed — useful when you want to view the diff from the other direction.
- Clear and start over. Click Clear both to empty both panels and begin a new text comparison.
Common use cases
- Contracts and legal drafts. Spot every clause that changed between two versions of an NDA or service agreement before signing. Because nothing leaves your browser, you don't expose confidential terms to a third-party server.
- Config file reviews. Compare YAML,
.env, or JSON configs between environments — say, staging in Toronto vs. production in San Francisco — to catch accidental overrides or missing keys before a deploy. - LLM output verification. When you ask an AI to refactor or rewrite a passage, paste the before and after to see exactly what it changed versus what it left alone. Trusting a summary is not the same as reading the diff.
- Document and essay revisions. Writers and editors use a text difference checker to review what changed between draft rounds without relying on tracked-changes features in a word processor.
- Duplicate and near-duplicate detection. Check whether two similar paragraphs are truly identical or differ in a few words. For removing exact duplicates across a list, the [duplicate remover](/en/remove-duplicates/) is a faster path.
Frequently asked questions
Is my text sent to a server?
No. This is a fully client-side tool — all diffing runs in your browser using JavaScript. Nothing is transmitted, stored, or logged. You can verify this by opening your browser's network tab while using the tool; you'll see zero outbound requests carrying your text.
How is this different from running `git diff` on the command line?
The underlying algorithm is the same LCS approach that git diff uses for line-level comparison. The browser tool gives you a visual, color-coded result without needing a terminal or a Git repository. For files already tracked in Git, git diff --no-index file1 file2 is the terminal equivalent.
Why does the diff show changes I didn't make?
The most common culprits are trailing whitespace and line-ending differences (CRLF on Windows vs. LF on Unix). A single invisible character at the end of a line is enough to mark it as changed. Paste both texts from the same source or strip trailing whitespace before comparing to eliminate phantom diffs.
Can I use this to compare text documents, not just code?
Yes. The tool works on any plain text — essays, blog drafts, legal clauses, configuration files, or log snippets. It performs a line-by-line comparison, so it works best when each logical unit (sentence, config key, code line) sits on its own line.
What's the difference between line-level and character-level diff?
Line-level diff (what this tool does) treats each line as the atomic unit and is the standard for code review and document comparison — it matches what Unicode TR #29 (text segmentation) calls 'hard line breaks'. Character-level diff is more granular but visually noisier and harder to read for most review tasks.
Why does the output sometimes look different from what a word processor shows?
Word processors use word-level or character-level tracked changes and apply formatting. This tool produces a plain line-by-line diff, which matches what tools like diff or git diff output. The GitLab 2017 db incident is a good reminder of why plain, readable diffs matter in high-stakes reviews — a line-level check on a config change can catch what a formatted document obscures.