Free Tool

Text Compare: Every Change, Even the Ones You Cannot See

A free diff checker for plain text. Paste two versions and see what changed, line by line and word by word. The verdict on top also tells you when two texts only look the same and names what differs: non-breaking spaces, zero-width characters, curly quotes, line endings. In your browser, nothing uploaded.

Your Two Texts

Paste, or open two text files up to 50 MB each; nothing is uploaded. A text field turns every line break into LF, so line endings (CR LF or LF) can only differ between opened files.

What to set aside

The comparison needs JavaScript.

How It Works

One Verdict, Then Every Change

The first line of the result answers the question you came with. Either the two texts are identical, or their words are the same and only characters you cannot see differ, or they differ in a number of lines, and the verdict says how many of those differ only invisibly.

Below it, both texts stand side by side, on a phone one under the other. A removed line carries a minus, an added line a plus, and inside a changed line the changed words are marked. Long unchanged stretches fold away, and Next Difference takes you from one change to the next.

Excerpt: one line, one character

− 3  Call us on Monday.
+ 3  Call us on[NBSP]Monday.
     non-breaking space, U+00A0

Why Lines That Look the Same Still Differ

A computer compares characters, not shapes. These are the ones that look like another character, or like nothing at all.

CharacterCode pointWhat it isSet aside with
Non-breaking spaceU+00A0A space that, in Unicode’s words, “should be the same width as the space”, so the eye cannot tell the two apart.Special spaces, tabs and double spaces
Zero-width spaceU+200BHas no width at all. Unicode meant it for invisible word separation and line break control.Zero-width characters, soft hyphens and other invisible marks
Soft hyphenU+00ADAn invisible mark for a place where a word may be hyphenated.Zero-width characters, soft hyphens and other invisible marks
Byte order markU+FEFFAt the very start of a file it marks the byte order; inside a text it is a zero-width no-break space. Invisible either way.Zero-width characters, soft hyphens and other invisible marks
Curly quotes and apostropheU+2018, U+2019, U+201C, U+201DUnicode’s preferred characters for quotation marks and the apostrophe in English. The straight ' (U+0027) and " (U+0022) are other characters.Curly quotes, dashes and the ellipsis
Dashes and the minus signU+2013, U+2014, U+2212Other characters than the hyphen-minus on the keyboard (U+002D).Curly quotes, dashes and the ellipsis
Line endingsCR LF, LF, CRTwo files can end their lines with different characters: carriage return and line feed, or one of the two alone.Line endings and spaces at the end of a line
Space at the end of a lineU+0020An ordinary space, invisible because nothing follows it.Line endings and spaces at the end of a line
Indentation and runs of spacesU+0020, U+0009Visible, but re-indented HTML or code changes every line without changing a word.Ignore indentation and the amount of white space

Every invisible or format character the tool finds is listed under the result with its code point and, for the characters in the tool’s table, its Unicode name (Unicode Standard 18.0). Two kinds of look-alike count as real changes, because they are different characters: a word that mixes Latin with Cyrillic or Greek letters (a Cyrillic а for a Latin a), and an accent written as a separate mark against the same letter written as one character. The result names both.

Try a Real Case

Each loads two versions into the tool above.

Compare Two Texts in Four Steps

From two versions to the lines that changed.

  1. 1

    Add Both Texts

    Paste the original on the left and the changed version on the right, or open two text files.

  2. 2

    Read the Verdict

    Identical, only invisible differences, or changed words in a number of lines.

  3. 3

    Set Aside What Does Not Matter

    Tick a switch and spaces, quotes or line endings stop counting. The verdict says what was set aside.

  4. 4

    Take It With You

    Copy either text, or the changes as a +/− diff for a ticket or a chat.

What It Handles, Read Locally

How the comparison works, and where it stops.

  • 50MB per file, read in your browser
  • 0Bytes uploaded
  • Plain text only. It compares text as it is. It is not a code diff (no syntax colours) and not a Word or PDF compare: copy the text out of the document, or save it as .txt, and compare that.
  • Moved lines. A line that moved shows at both places, with the line it moved to or from, instead of as one removed and one added line. If it also changed in characters you cannot see, the row says so and marks them.
  • Long texts and long lines. Texts are compared in slices, so the page stays usable; only a single line of tens of megabytes can pause it for a moment. A line of several megabytes, such as minified JSON, is compared from its first to its last difference and shows the stretches around its changes, with a button that shows more of the rest. If two long texts differ almost everywhere, the tool stops looking for the smallest set of changes after three seconds, compares more coarsely and says so above the result.
  • How it compares. Lines and words are matched with Eugene W. Myers’ difference algorithm (Algorithmica, 1986) in its linear-space form. The character names are those of the Unicode Standard 18.0.
  • Line endings. The HTML standard has a text field turn every line break into LF, so CR LF against LF shows only between two opened files. A byte order mark at the start of a file is kept and compared.
  • Case and white space. Both count as changes unless you tick Ignore upper and lower case, or Ignore indentation and the amount of white space: runs of spaces and tabs then count as one space, and none at the start or end of a line. The verdict says how many lines differed only there.

Text Compare FAQ

Short answers to what people ask about comparing texts.

How do I compare two texts and find the differences?

Paste the original on the left and the changed version on the right, or open two text files. The verdict on top says whether they differ; below it, a removed line carries a minus, an added line a plus, and the changed words inside a line are marked.

Why do two lines that look identical show as different?

Because one of them holds a character that is not the one it looks like: a non-breaking space (U+00A0) instead of a space, a zero-width space, a curly quote instead of a straight one, or a space at the end of the line. The tool names the character and draws it where it stands.

How do I ignore whitespace or line endings when comparing text?

For re-indented text, tick Ignore indentation and the amount of white space: runs of spaces and tabs then count as one space, and none at the start or end of a line. For invisible characters, tick the switch for what should not count: special spaces, tabs and double spaces; zero-width characters and soft hyphens; curly quotes and dashes; line endings and spaces at the end of a line. Ignore all invisible differences ticks those four. The verdict says what was set aside.

When does it mark words and when letters?

A changed line is compared word by word. Where one word was replaced by a word that shares at least half its letters, as in colour and color, only the changed letters are marked; otherwise the whole word is.

Is my text uploaded or stored?

No. Both texts are compared in your browser and nothing is sent or stored. You can watch the network panel of your browser while you compare: no request carries your text.

Is there a size limit?

Files can be up to 50 MB each. Long texts are compared in slices, so the page stays usable; only a single line of tens of megabytes can pause it for a moment. If two long texts differ almost everywhere, the tool switches to a coarser comparison after three seconds and says so above the result.

Can it compare Word or PDF files?

No. It compares plain text. Copy the text out of the document, or save it as a .txt file, and compare that. It is not a code diff either: there is no syntax colouring.

We Make Salesforce Marketing Work for You

Talk to a certified consultant, not a salesperson, and leave the first call knowing your next step.