Skip to content
useToolz online tools

Сравнение текстов онлайн

Sign in or register to save tools to favorites

Original
Modified
·

Line-by-line comparison of two texts.

Added lines are highlighted in green, removed lines in red. Unchanged lines are displayed in gray.

Useful for comparing configuration files, code snippets, and text documents.

Text Diff — Online Text Comparison with Change Highlighting

The tool compares two texts and shows all differences: added lines (green), removed (red), and changed (with character-level highlighting). Supports side-by-side mode and line numbering.

How the Comparison Algorithm Works

The tool uses the LCS (Longest Common Subsequence) algorithm — the same used by Unix diff and Git. It minimizes the number of edits (insertions and deletions) to transform the original into the modified version.

For adjacent removed/added lines, an additional character-level inline diff finds the common prefix and suffix to show exactly which characters changed.

Display Modes

ModeDescriptionWhen to use
UnifiedChanges in one stream, full context visibleSmall edits, patch review
Side-by-sideOriginal left, modified rightLarge blocks, logic comparison
Inline diffCharacter-level changes highlightedTypos, pinpoint edits

Use Cases

  • Code review — compare old and new code versions before a pull request
  • Documents — find changes between contract or spec versions
  • Configs — compare nginx.conf or docker-compose.yml before/after editing
  • Translations — verify all strings are translated by comparing original with translation

Frequently Asked Questions

How many lines can be compared?
No strict limit. Processing happens in the browser, practically instant up to 10,000 lines.

Is data sent to a server?
No. Comparison runs entirely in the browser. Confidential code stays on your device.

How to compare JSON files correctly?
Format both JSONs in the JSON formatter with identical indentation, then paste into Text Diff.

For pattern matching use the Regex tester.

We use cookies for site operation and analytics. Подробнее

Upscaled image
Download

Log in to continue

or