Open Tools LibraryOpen Tools Library
Developer Tools

Text Diff Checker

A genuine LCS diff algorithm — line view, word view, ignore-case/whitespace, and a copyable unified diff.

Also known as: Diff checker, Text comparison tool, Compare text online

100% FreeNo Signup RequiredReal LCS Diff AlgorithmLine & Word Views
100% local — nothing you enter here ever leaves this browser tab
Loading tool…
Step by step

How it works

  1. 1Paste the original text on the left and the revised text on the right.
  2. 2Switch between line view and word view depending on what you're comparing.
  3. 3Toggle ignore case or ignore whitespace if formatting differences shouldn't count as changes.
  4. 4Copy the result as a unified diff, ready to paste elsewhere.
Why OTL

Why use Text Diff Checker

Genuine LCS diff algorithm

Computes a true minimal-edit difference — the same foundational technique behind GNU diff — not a rough approximation.

Line and word views

Compare whole lines for documents and code, or individual words for catching small wording changes in prose.

Ignore case and whitespace

Filter out formatting-only differences so the diff reflects meaningful content changes.

Live similarity stats

See lines added, removed, and a similarity percentage at a glance, without counting manually.

Copy as unified diff

Export the result in the standard +/- format used by Git and most version control tools.

Nothing uploaded

Both texts are compared entirely in your browser — neither is ever sent to a server.

Real-world use

Who uses Text Diff Checker

Reviewing a document revision

See exactly what changed between two drafts of a contract, essay, or report.

Comparing code snippets

Spot the exact lines that differ between two versions of a function or config file.

Checking a translation or edit

Use word view to catch small wording changes in a paragraph that a line-level diff would miss.

Auditing a config file change

Confirm exactly what changed between two versions of a configuration or settings file.

Preparing a code review comment

Generate a clean unified diff to paste directly into a review comment or bug report.

Verifying an automated find-and-replace

Confirm a bulk text replacement only changed what was intended by comparing before and after.

Deep dive

About Text Diff Checker

Comparing two versions of a document or a piece of code by eye is slow and error-prone past a few lines — the eye is bad at spotting a single changed word buried in a paragraph, or a one-line change in a hundred-line file. A proper diff algorithm solves this precisely: it computes the smallest possible set of additions and removals that transforms one text into the other, so what's highlighted is genuinely what changed, not an artifact of a naive line-by-line comparison.

This tool implements the longest common subsequence (LCS) algorithm directly — the same foundational approach behind GNU diff and, in spirit, Git's diff engine (which uses the faster but equivalent-output Myers algorithm). LCS finds the longest sequence of lines or words that both texts share, in order, and everything not part of that shared sequence is marked as added or removed. This guarantees a minimal, genuinely accurate diff rather than a rough approximation.

Line view is built for comparing documents, config files, or code, where the meaningful unit of change is usually a whole line. Word view instead diffs at the word level within a block of prose, which is far more useful for catching a small wording change in a paragraph than a line-level diff would be, since it highlights only the specific words that changed rather than flagging the entire surrounding line.

Ignore-case and ignore-whitespace options matter for a common false-positive: a line that's functionally identical but differs only in capitalization or trailing spaces. Toggling these treats those differences as non-changes, so the diff reflects meaningful content changes only. The result can be copied as a standard unified diff — the same +/- format used by Git and most version control tools — ready to paste into a commit message, code review comment, or bug report.

Compare

Text Diff Checker vs. other options

How Open Tools Library compares to desktop software and other online tools.

FeatureOpen Tools LibraryDesktop softwareOther online tools
PriceFree, unlimitedN/AUsually free
Real diff algorithmYes, LCS-basedN/AVaries in quality
Word-level diff modeIncludedN/ASometimes missing
Unified diff exportOne-click copyN/ANot always offered
Data privacyNever leaves your deviceN/AOften sent to a third-party API
Pro tips

Pro tips

  • Use line view for code and structured documents, and word view for prose — each highlights the type of change more clearly for its use case.
  • Enable "ignore whitespace" when comparing code that may have been reformatted (different indentation or trailing spaces) without meaningful content changes.
  • The similarity percentage is based on unchanged lines relative to the total — useful as a quick sanity check on how substantial a revision actually was.
  • A unified diff copy is compatible with most tools that can read standard +/- diff format, including many code review platforms.
  • For very large documents, line view will generally be faster to scan than word view, since it groups changes by line rather than highlighting individual words throughout.
Under the hood

Technical specs

Algorithm
Longest common subsequence (LCS) — same family as GNU diff
Views
Line-level and word-level
Options
Ignore case, ignore whitespace
Export
Copy as standard unified diff
Processing location
100% local, in your browser

Privacy & security

Comparing two drafts, code snippets, or documents shouldn't require sending either one to a third-party server.

Both texts are compared entirely in your browser using a local LCS diff algorithm.

Neither text is ever uploaded anywhere.

No account, email, or login required.

Nothing is stored or logged after you close the tab.

FAQ

Frequently asked questions

Is this tool free to use?

Yes, completely free with no limits, and no account needed.

How is my data handled?

Both texts are compared entirely in your browser using a local diff algorithm — neither is ever sent to a server.

What algorithm does this use?

Longest common subsequence (LCS), a well-established diff technique that computes a genuine minimal-edit difference, the same foundational approach behind tools like GNU diff.

What's the difference between line view and word view?

Line view compares whole lines, marking each as added, removed, or unchanged. Word view compares individual words, useful for catching small changes within continuous prose.

Can I export the result?

Yes — copy the diff as a standard unified diff, the same +/- format used by Git and most version control and code review tools.

Stuck?

Troubleshooting

The diff shows a whole line as changed when only one word changed

Switch to word view — line view treats any change within a line as a full line replacement by design; word view highlights just the specific words that changed.

Two lines that look identical are marked as different

Check for invisible differences like trailing whitespace or different capitalization — enable "ignore whitespace" or "ignore case" if those shouldn't count.

The similarity percentage seems low for a small change

It's calculated relative to total line count, so a small change in a short document affects the percentage more than the same change would in a long one.

Can I compare very large documents?

Yes, though extremely large texts (many thousands of lines) may take a brief moment to process since the algorithm computes an exact comparison table.

Ready to use Text Diff Checker?

Free, private, and ready right now — no signup required.

Scroll to Text Diff Checker