Skip to content

Text Compare

Paste two texts and instantly see every difference highlighted line by line. Perfect for code reviews and document revisions. Free, no sign-up needed.

Differences
Paste or type text in both fields to compare them.

Text Comparison

A text diff compares two versions of a text line by line and identifies what changed between them. Lines that appear only in Text A are marked as removed (red); lines that appear only in Text B are marked as added (green); lines present in both are shown unchanged. Common use cases include: code review (spot changes between two versions of a file), document revision (track edits between drafts), configuration comparison (detect differences between two config files), and log analysis (compare output from two runs of a process). The algorithm used is based on the Longest Common Subsequence (LCS), the same foundation used by tools like diff, Git, and GitHub's code review interface.

Use cases for text comparison

Code review — compare two versions of a file to spot changes before merging. Config auditing — detect drift between staging and production configuration files. Document revision — track edits between drafts of a proposal, contract, or README. Log analysis — compare output from two process runs to find behavioral differences. API debugging — paste two JSON responses to pinpoint where payloads diverge.

How does the diff algorithm work?

This tool uses the Longest Common Subsequence (LCS) algorithm — the same foundation behind Unix diff, Git, and GitHub's pull-request view. It compares input line by line, then runs a character-level diff on changed line pairs to highlight exactly which characters were modified. Removed text is shown in red; added text in green.

Privacy

All comparison runs 100% in your browser. No data is sent to a server.