Text Compare
Compare two text blocks side by side and highlight changed lines visually.
Left text
Right text
Visual diff
Unified diff
Diff output
What is a text compare tool?
A text compare tool (also called a diff tool) takes two blocks of text and highlights every difference between them — showing which lines were added, removed, or changed. It is the same fundamental operation that powers git diff, code review tools like GitHub and GitLab, and merge conflict resolution in every IDE. Instead of reading two texts side by side and spotting changes manually, the algorithm identifies differences precisely and presents them visually so you can focus on reviewing the changes rather than finding them.
How diff algorithms work
The most widely used diff algorithm is the Myers algorithm (1986), which finds the shortest edit script — the minimum number of line additions and deletions needed to transform one text into another. "Shortest" matters because it produces the most human-readable diff: instead of showing that all 50 lines changed, it shows the 3 lines that actually differ. Most diff tools, including Git, use a variant of the Myers algorithm. The output is typically a unified diff — a compact format that shows context lines above and below each changed section, with + marking additions and - marking deletions.
How to use this tool
- Paste the original (or older) text into the left panel.
- Paste the modified (or newer) text into the right panel.
- Click Compare.
- Changed lines are highlighted in the visual diff grid.
- The unified diff output can be copied and shared.
Line-level vs character-level diffing
This tool performs line-level diffing — it identifies which lines changed, not which individual characters within a line changed. This is the standard approach used by Git and most code review systems because it maps naturally to how code is structured. Character-level diffing (also called word diff or inline diff) shows the exact characters that changed within a modified line, which is useful for spotting small edits in prose or configuration values. For a character-level view of a changed line, compare the highlighted left and right versions side by side.
Practical use cases
- Configuration changes: Compare two versions of a config file (YAML, JSON, TOML, .env) to see exactly what changed during a deploy
- API response changes: Paste two JSON responses to identify which fields were added, removed, or changed between API versions
- Document review: Compare two versions of a specification, requirements document, or README to audit edits
- Code review without Git: Compare snippets shared in chat, tickets, or emails that don't have a Git history
- Database migration scripts: Verify that a migration was applied correctly by comparing before and after schema dumps