Utilo

Text Diff Checker

Compare two blocks of text or code and see additions and deletions highlighted by line or word.

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

  1. Paste the original text on the left and the changed text on the right.
  2. Choose Lines for code and configuration files, or Words for prose and contracts.
  3. Read the summary counts of added and removed lines or words.
  4. 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 .env or 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.

Frequently asked questions

Is my text sent to a server?

No. The comparison runs entirely in your browser in a background worker.

What is the difference between line and word mode?

Line mode treats each line as a unit, which suits code. Word mode compares individual words and spaces, which shows small edits inside long paragraphs.

How large can the texts be?

Hundreds of thousands of characters work. Very different large texts take longer, because the algorithm's cost grows with the number of differences.

Can I compare files directly?

Open the files in any editor and paste their contents. Everything stays on your device.

Yes. All processing happens directly in your browser using JavaScript, Web Workers and Web APIs. Nothing you type, paste or upload is sent to our servers.