Diff Checker
Compare two blocks of text side by side with color-coded additions, deletions, and changes.
How It Works
The Diff Checker compares two text documents line by line and produces a colour-coded report of what was added, removed, or changed between them. Paste the original text in the left panel, the modified text in the right panel, and click Compare; the tool runs a longest-common-subsequence algorithm to find the minimum-cost set of insertions and deletions that transform left into right, then renders a unified view with green for added lines, red for removed lines, and a summary count of changed/added/removed lines at the top. The diff is line-based (whole-line granularity), which is the right choice for comparing source code, configuration files, prose paragraphs, or CSV rows — anywhere a meaningful unit is one line. Inputs above 2,000 lines are rejected to keep the browser responsive (LCS is quadratic in input size). All diffing happens in your browser, so confidential drafts, sensitive config, or production logs stay on your device. The output can be copied or reviewed in place; there is no upload or temporary storage involved.
Use Cases
- Reviewing changes to a config file before deploying
- Comparing two versions of a document to find editorial differences
- Checking that a generated file matches a reference output
- Spotting whitespace or encoding differences invisible to the naked eye
Frequently Asked Questions
- Is this a line diff or a character diff?
- Line diff. Each line is treated as a unit. For sub-line precision, post-process the changed lines with a word-level diff.
- How big a comparison can I run?
- The tool caps inputs at about 2,000 lines per side. The LCS algorithm is quadratic, so very large inputs would freeze the browser tab.
- Does it ignore whitespace?
- Currently no — every byte counts. To compare two files while ignoring whitespace, normalise externally first (e.g. with `tr -s ' '`).
- Are my texts sent anywhere?
- No. The diff runs entirely in your browser, so confidential documents stay private.
- Why does a single edit show up as one removed line plus one added line?
- That is how line-based diffs represent a change: one line is removed, the new version is added. The summary counts both, but for a human reader it is one logical edit.