What this diff checker does
Comparing two versions of a text by eye is slow and error-prone. This diff checker computes the minimal set of changes between an original and a changed text using the Myers algorithm, the same approach behind git diff, and displays added and removed lines or individual words with colour highlighting. The comparison runs in a Web Worker, so large files do not freeze the page.
How to use it
- Paste the original text on the left and the changed text on the right.
- Choose Lines for code and configuration files, or Words for prose and contracts.
- Read the summary counts of added and removed lines or words.
- Scroll through the highlighted result; very long diffs show more rows on demand.
Practical examples
- Config drift: paste the production and staging versions of an
.envor YAML file to find the one value that differs. - Contract review: use word mode to see exactly which words a counterparty changed in a clause.
- API responses: format two JSON responses with the JSON tool first, then diff them to spot changed fields.
- Translations: compare an old and new English source string to see what needs re-translating.
Tips and edge cases
- Whitespace matters. Trailing spaces and tabs versus spaces show up as changes; normalise them first if they are irrelevant.
- Windows (
\r\n) and Unix (\n) line endings can make every line appear changed. - Reordered blocks appear as a removal plus an addition, because a diff describes edits, not moves.
- For minified files, format them before diffing, otherwise the whole file is a single changed line.
- The diff is computed after a short pause in typing to avoid redundant work on large inputs.