Text Diff Checker
Compare two blocks of text side by side and highlight the differences line by line.
About the Text Diff Checker
A text diff tool compares two versions of text and highlights what has changed — which lines were added, removed, or modified. Diffing is a fundamental operation in software development (comparing code versions), writing (tracking document revisions), and system administration (comparing config files).
How diffing works
Most diff algorithms are based on the Longest Common Subsequence (LCS) problem — finding the longest sequence of characters or lines that appear in the same order in both texts. Lines unique to the first text are marked as deletions (removed), and lines unique to the second text are marked as additions (inserted). Lines that appear in both are shown unchanged.
Common use cases
- Config file comparison — Checking what changed between two versions of an nginx config, a JSON settings file, or a Docker Compose YAML.
- API response changes — Identifying what has changed between two API responses or data exports.
- Document revision review — Seeing what was added or removed between two drafts of a document.
- Code snippet comparison — Quickly comparing two blocks of code before committing.
Unified diff format
Lines prefixed with + are additions (present in the new version but not the old). Lines prefixed with - are deletions (present in the old version but not the new). Unchanged lines provide context around the changes. This format is the same used by git diff and patch files.