Text Diff Checker — Compare Two Texts — DevToolkit

Online Text Diff Checker

Compare two blocks of text and instantly see the differences highlighted line by line. This diff checker uses the Longest Common Subsequence (LCS) algorithm — the same fundamental approach used by Git and other version control systems.

What Can You Compare?

  • Source code (JavaScript, Python, Go, Rust, etc.)
  • Configuration files (JSON, YAML, TOML, .env)
  • SQL queries and database schemas
  • API responses and JSON payloads
  • Markdown documents and README files
  • Plain text, logs, and CSV data

How to Read the Diff

Lines highlighted in green (+) were added in the modified text. Lines highlighted in red (-) were removed from the original text. Unmarked lines are identical in both texts.

Features

  • Line-by-line comparison with unified diff view
  • Color-coded additions (green) and deletions (red)
  • Line numbers for both original and modified text
  • Change statistics (added, removed, unchanged lines)
  • Swap function to quickly reverse the comparison
  • 100% client-side — your data never leaves your browser