Cipher Utility

Text Compare

U-02

Paste two versions of a text and see exactly what changed. Runs in your browser; nothing is uploaded.

Compare:
Ignore:

3. Differences

How to read the result

  1. Plain text is in both versions.
  2. A green block was added.
  3. Struck-through text was removed.
  4. A change shows as a removal next to an addition.

Worked example

brown fox → red fox

By word, one removed and one added:

brown red fox

"fox" is unchanged

Cipher Utility reference card Catalog no. U-02

How the comparison works

The tool splits both texts into pieces (lines, words or characters) and finds the longest sequence of pieces that appears in both, in the same order. Everything in that common sequence is unchanged. Pieces only in the original were removed, and pieces only in the changed text were added. This is the same idea behind the diff tools programmers use to review code.

Because it works on the longest common sequence, it shows the smallest set of changes that turns one text into the other, though not always the one a person would describe. A moved paragraph, for example, shows as removed in one place and added in another.

Lines, words or characters

ModeBest forShows
LinesCode, lists, CSV and config filesWhole changed lines, marked + and -
WordsArticles, essays, contractsChanged words in running text
CharactersTypos, IDs, short stringsEvery changed letter

Checking if two texts are identical

If all you need is a yes or no, the score above says "Identical" when nothing differs. For very long texts or files, comparing their hashes is quicker: identical content always has the same SHA-256 hash, and any change gives a different one.

Questions about comparing text

How do I compare two texts?

Paste the original on the left and the changed version on the right. The differences appear below as you type: added text in a green block, removed text struck through.

Should I compare by lines, words or characters?

Lines suit code, lists and config files. Words suit prose, and are the default. Characters show the smallest changes, such as a single typo, but get noisy on large edits.

How is the similarity score calculated?

It counts the parts both texts share and divides by the total size of both texts, then doubles it, so identical texts score 100% and texts with nothing in common score 0%. The unit is whatever you compare by: lines, words or characters.

Can I ignore case and spacing?

Yes. Ignore case treats A and a as the same. Ignore spacing treats any run of spaces, tabs or line breaks as one space and ignores spaces at the start and end of lines.

Is my text uploaded anywhere?

No. The comparison runs in your browser with JavaScript, so both texts stay on your device. That makes it safe for contracts, code and other private text.