Skip to content
epitometool

String diff

Regex & strings

Inline character-level diff between two strings.

Updated

Inputs

Diff

+8-1034 unchanged
The quick bredown fox leajumps over the lazy catdog.

Quick start

How to compare two strings character by character

Paste original and changed text, see additions, deletions and unchanged runs highlighted inline.

  1. Step 1
    Paste original (A)

    Drop the baseline string into the left textarea.

  2. Step 2
    Paste changed (B)

    Drop the modified version into the right textarea.

  3. Step 3
    Read the diff

    Insertions appear green, deletions red and struck-through. Counts at the top show characters added / removed / unchanged.

In-depth guide

String diff — character-level comparison

Compare two strings character by character and see exactly which letters were added or removed. Built for short inputs — version numbers, sentences, JSON values — where line-level diff is too coarse.

When to use character-level diff

  • Comparing version strings — 1.4.2 vs 1.4.10.
  • Spot-checking a single sentence rewrite.
  • Catching subtle typos: invisible double spaces, swapped letters.
  • Comparing two URLs that differ in query string.
  • Verifying transliteration or i18n changes.

For comparing files or multi-line code, use the line-level text diff tool instead.

How the diff is computed

We use the classic longest-common-subsequence (LCS) algorithm with a 2D DP table. For each character we either match it (no change), delete it from A, or insert from B — backtracking through the table produces an optimal edit script.

Adjacent operations of the same type are coalesced into runs (so "hi" → "hello" shows as a single insertion of "ello" rather than four separate inserts).

Limits and edge cases

  • Size cap — inputs over 5,000 characters per side fall back to line-level diff to keep the browser responsive.
  • Whitespace is significant — trailing spaces and Windows vs Unix line endings will show as diffs.
  • No semantic awareness — moving a word still shows as a delete + insert. Dedicated word-diff tools handle that case.

Frequently asked questions

Does this tool send my text anywhere?

No. The diff is computed in your browser using a longest-common-subsequence algorithm. Nothing leaves the page.

How does it differ from text-diff?

string-diff is character-level — useful for short strings, version numbers, single sentences, where you want to see exactly which letters changed. text-diff is line-level for comparing files or code.

What's the input size limit?

Character-level diff is O(n × m) memory — we cap at 5,000 chars per side. Larger inputs fall back to line-level diff automatically. For huge files, use text-diff.

Does it handle emoji and combining marks correctly?

Yes — we split inputs by Unicode code point, so 🇺🇸 and é (e + combining accent) are treated as single graphemes where possible.

What does the +/- count mean?

Inserts count characters present in B but absent in A; deletes count characters in A but not in B. Together with unchanged they equal the total characters in the diff.

Why aren't there more options (case-insensitive, whitespace-ignore)?

Keeping it simple. Pre-normalise (lowercase, trim, collapse spaces) before pasting if you want to ignore those differences.

Keep exploring

More tools you'll like

Hand-picked utilities that pair well with the one you're on — all free, client-side, and zero-signup.