Passer au contenu principal

Text Diff

Text diff comparison shows exactly what changed between two versions of any text — added, removed, or modified lines. Our diff tool uses the Myers diff algorithm (the same algorithm used by Git) to produce the most human-readable change set, with side-by-side and unified view modes, word-level and character-level diffing for fine-grained comparison.

Texte original

Texte modifié

Diff ligne par ligne

Partager cet outil
Text Tools

À propos de Text Diff Checker

Text diff comparison shows exactly what changed between two versions of any text — added, removed, or modified lines. Our diff tool uses the Myers diff algorithm (the same algorithm used by Git) to produce the most human-readable change set, with side-by-side and unified view modes, word-level and character-level diffing for fine-grained comparison.

Comment l'utiliser

  1. Paste the original text in the left panel and the modified text in the right panel.
  2. See additions highlighted in green, removals in red.
  3. Toggle between line diff (default), word diff, and character diff.
  4. Switch between side-by-side and unified (Git-style) views.

Formule et méthodologie

Myers diff algorithm: finds the shortest edit script (minimum additions + deletions) to transform one text into another. O(ND) time complexity where N is total lines and D is number of differences. Longest Common Subsequence (LCS) is the mathematical foundation. Similar to GNU diff and git diff output.

Cas d'usage courants

  • Comparing two versions of a document or contract
  • Code review: quickly visualizing changes outside an IDE
  • Detecting plagiarism or unauthorized modifications to agreements
  • CMS: comparing draft vs published versions
  • Data validation: comparing expected vs actual output in testing

Questions fréquentes

Line diff marks entire lines as added/removed — the standard mode for most tools. Word diff shows which specific words within a line changed, which is more useful for prose or when small text changes span multiple words. Character diff goes even finer. For code: line diff is standard. For legal documents or essays: word diff is far more useful.
Our tool accepts pasted text. For file-based diffing: Unix/Mac users can run "diff -u file1 file2" in the terminal. Git users: "git diff" shows changes. Online tools including this one are useful when you don't have file access or want a visual interface. For recurring needs, IDE extensions (VS Code's built-in diff viewer, GitLens) are more convenient.

Outils connexes

Tous les outils →

Intégrer cet outil sur votre site

Gratuit pour usage personnel et commercial. Copiez simplement le code ci-dessous.