gizmobench
BrowseDaily

Compare Text Ignoring Whitespace

Find text changes while ignoring runs of spaces and tabs and spacing at line edges. This page opens with Whitespace set to Ignore; your remembered view and case choice restore independently. Original spacing stays visible. Blank lines remain part of the comparison, and Copy unified includes every row.

Two empty boxes.

Word by word inside changed linesLine endings normalised firstBoth texts stay in this browserNo account, no sign-up
View
Case
Whitespace

The original has 1 line and the changed text has 1. The two texts are identical under the options you chose, once line endings are normalised.

The original on the left and the changed text on the right, line by line. Words that moved inside a changed line are tinted.
#Original#Changed
1(blank line)1(blank line)
  • Two identical textsnothing to report
    no changes
  • Windows and Mac endingsnormalised before comparing
    no changes
  • A line repeated three timesone edit, paired the same way every run
    1 changed line

Plain text only: paste the two versions in, or open a file in a text editor and copy it here. Case decides whether "Hello" and "hello" are the same line, and Whitespace decides whether spacing inside a line counts as a difference. Neither option changes the text shown, only what counts as equal. A line over 2,000 tokens is marked as changed as a whole rather than word by word.

Why a word diff, and why line endings come first. Marking a whole line as different when one word moved leaves you doing the comparison again by eye, so every changed pair is compared a second time token by token and only the words that moved are tinted. And before any of that, CRLF, CR and LF endings all become one, because the same file saved on Windows and on a Mac is one text, not a text where every line changed.
Accuracy. Line endings are normalised before comparing, so the same file saved on Windows and on a Mac does not read as changed on every line. Changed lines are compared again word by word. Where lines repeat, more than one alignment is correct, and this one pairs them the same way every time.

Common questions

What spacing is ignored?
Space and tab runs become one space and line edges are trimmed for equality. It is not removal of every whitespace character: a b still differs from ab, and a blank line still differs from no line.
Can I ignore case too?
Choose Case → Ignore. Default Unicode lowercasing decides equality; the original capitalization stays visible. This does not perform semantic, locale-specific or plagiarism analysis.
Can I compare files with this preset?
Open each text file and paste its text into the two boxes. There is no file importer. CRLF, LF and CR endings normalize before comparing. Up to 20,000 lines and 2,000,000 UTF-16 code units are accepted per box.
Does opening this page change my remembered settings?
Typing source text preserves previous Whitespace, Case and View choices in storage. Explicitly selecting a control saves only that control’s setting. Copy is disabled while the current source comparison is pending.

Line endings are normalised before comparing, so the same file saved on Windows and on a Mac does not read as changed on every line. Changed lines are compared again word by word. Where lines repeat, more than one alignment is correct, and this one pairs them the same way every time.