Diff Checker
Compare two blocks of text side by side and see the differences highlighted. LCS-based diff algorithm with line-by-line comparison.
All comparison is performed locally in your browser. No text is sent to any server.
How to Use Diff Checker
- 1Paste original text on the left side.
- 2Paste modified text on the right side.
- 3See additions (green) and removals (red) highlighted.
- 4Copy the diff output or adjust comparison options.
Zenovay
Privacy-first analytics for your website
Understand your visitors without invasive tracking. GDPR compliant, lightweight, and powerful.
Related Tools
JSON Formatter & ValidatorFormat, validate, and beautify JSON data with syntax highlighting and error detection.
JWT DecoderDecode and inspect JWT tokens. View header, payload, and verify signatures.
Base64 Encode/DecodeEncode text to Base64 or decode Base64 back to text. Supports UTF-8 and binary data.
URL Encode/DecodeEncode or decode URL components. Handle special characters, query strings, and full URLs.
Frequently Asked Questions
What is a text diff?▾
A text diff (short for "difference") is a comparison between two versions of a text that highlights what changed. It shows which lines were added, which were removed, and which stayed the same. Diffs are fundamental to version control systems like Git, code review tools, and collaborative editing. The output is sometimes called a "patch" because it can be applied to the original to produce the modified version.
What diff algorithms are commonly used?▾
The most widely used algorithm is the Longest Common Subsequence (LCS) algorithm, which finds the largest set of lines that appear in both texts in the same order. Git uses the Myers diff algorithm (1986), which is an optimized O(ND) algorithm that produces minimal edit scripts. Patience diff (used by Bazaar and optionally by Git) anchors diffs on unique lines for more readable output. Histogram diff is a variant of patience diff used by default in newer Git versions. This tool uses an LCS-based approach for accurate, minimal diffs.
What is the difference between unified and side-by-side diff views?▾
A unified diff (also called inline diff) shows the two texts interleaved in a single column: lines prefixed with "-" are from the original, "+" lines are from the modified version, and lines without a prefix are unchanged context. A side-by-side diff shows the original and modified texts in two adjacent columns, with changes highlighted on the same row. Side-by-side is often easier to read for humans, while unified format is the standard for patch files and command-line tools like git diff.
How do I read diff output?▾
In a standard diff: lines highlighted in red (or prefixed with "-") are present in the original but absent in the modified version — they were removed or replaced. Lines highlighted in green (or prefixed with "+") are new in the modified version — they were added or are replacements. Lines shown in gray (no prefix) are unchanged context lines present in both versions. The line numbers shown correspond to positions in each respective file.
What are common use cases for a diff checker?▾
Common uses include: comparing two versions of a document to see what changed, reviewing configuration file differences before deploying, checking what was modified in a code snippet, comparing API response bodies across environments, proofreading edits to text, verifying that a find-and-replace operation changed only the intended lines, comparing log files, and reviewing legal or contract document revisions. Diff tools are also used in testing to compare expected vs. actual output.