Case-insensitive diff

Case-insensitive diff compares two texts line by line while folding letter case. Paste both into the input pane separated by a line of ---; lines that match after lowercasing pass through with their original casing intact, lines that genuinely differ are shown as - (text A) followed by + (text B). The diff runs in your browser; nothing uploads. For case-sensitive comparison use diff.

Input
Line 1:1 LF cloud_done Saved locally
Result Case-Insensitive Diff
0 lines 0 chars

Diff with letter case folded out

Case-insensitive diff is the standard line diff with one tweak: equality is checked after lowercasing both sides. Internally the tool calls String.prototype.toLowerCase() on each pair of lines and compares the results. If they match, the line is emitted with its original casing (from text A); if they differ, the standard - A line followed by + B line pair is produced with both originals preserved.

The split between text A and text B is a line containing exactly ---. Pairing is positional, like the regular line diff: line 1 of A is compared to line 1 of B, line 2 to line 2, and so on. Inserting a line in B will shift indices and cascade as a string of changes; this is the same trade-off as the case-sensitive version.

Whitespace and punctuation are still significant. Hello and HELLO match, but Hello, and Hello do not because the comma is content. For full punctuation tolerance run a remove punctuation pass first; for word-level rather than line-level diff see word diff.

How to use case-insensitive diff

  1. 1Paste text A into the input panel, then a line with ---, then paste text B.
  2. 2The case-folded diff appears in the output panel; matched lines keep their original casing, changed lines show both versions.
  3. 3Click Copy to copy the diff, or Download to save it as a .txt file.
  4. 4Compare the result with case-sensitive diff to spot changes that are casing-only.
  5. 5For sub-line granularity pivot to word diff or character diff.

Keyboard shortcuts

Drive TextResult without touching the mouse.

Shortcut Action
Ctrl FOpen the find & replace panel inside the input Plus
Ctrl ZUndo the last input change
Ctrl Shift ZRedo
Ctrl Shift EnterToggle fullscreen focus on the editor Plus
EscClose find & replace, or exit fullscreen
Ctrl KOpen the command palette to jump to any tool Plus
Ctrl SSave current workflow draft Plus
Ctrl PRun a saved workflow Plus

How the case-folded diff works

Lowercase comparison, original output

Lines are lowercased before equality check, but the output preserves the original casing from text A. So Hello World and HELLO WORLD match and the output reads   Hello World.

Position-based pairing

Line 1 of A is compared to line 1 of B, line 2 to line 2, and so on. No fuzzy alignment. Inserting a line at the start of B shifts every subsequent index.

Whitespace and punctuation matter

Only letter case is folded out. Hello, versus hello still registers as a change because the comma is content. Strip punctuation first with remove punctuation if you want fuller tolerance.

Three-hyphen separator

The split between A and B is a line containing exactly ---. The tool needs this marker to know where text A ends and text B begins.

Plain-text output with -/+

Output uses two-space prefix on matched lines, - on the A version of changed lines, and + on the B version. Same shape as the standard line diff, just with case folded.

Worked example

Both lines match after lowercasing, so they pass through with their original casing from text A. Switch to case-sensitive diff to see the casing changes called out.

Input
Hello World
Quick brown fox
---
hello world
Quick BROWN fox
Output
  Hello World
  Quick brown fox

Settings reference

Behaviour Effect on output
Separator A line containing exactly --- splits text A from text B.
Match rule Equality after toLowerCase() on both sides.
Output for matches Two-space prefix, original casing from text A.
Output for changes - A-line followed by + B-line, both originals.
Whitespace Significant. Spaces, tabs, and trailing whitespace count.
Punctuation Significant. Letter case is the only thing folded out.
Missing separator Output prompts for two halves split by ---.

FAQ

Does it ignore everything case-related, including accented letters?
It uses JavaScript's default toLowerCase(), which follows Unicode case mapping. Latin accented letters fold cleanly (É matches é); Turkish dotted-I needs locale-aware handling that this tool does not configure. For pure ASCII case folding, that detail does not matter.
How is this different from regular line diff?
Diff two texts is byte-for-byte; this version lowercases each pair before equality. Use case-insensitive diff when capitalisation in headings or names is irrelevant to the change you care about.
Are punctuation differences still flagged?
Yes. Hello, and hello still register as a change because the comma is content. Run a remove punctuation pass first to drop punctuation before diffing.
Which casing does the matched-line output use?
Text A's casing. So if A has Hello and B has HELLO, the matched line in the output reads Hello.
Where does my text go?
Nowhere. Everything happens locally in your browser via JavaScript.