Browse the guides
Docs

Compare Unicode strings that look the same

Find the first code-point difference between two strings. Separate exact equality from NFC and NFKC equivalence without changing either input.

ON THIS PAGE
  1. Start with the two original strings
  2. Four pairs with different explanations
  3. Read positions without splitting emoji
  4. What equal does and does not establish

Start with the two original strings

A name copied from a document may look like the name in a form and still fail an equality check. Save both originals before trying a fix. Retyping the text can remove the very difference you need to find; a screenshot cannot preserve its encoded sequence.

  1. Set Text A

    Open Unicode Inspector and paste the first value into Input. This is Text A for the comparison.

  2. Set Text B

    Scroll to Compare two Unicode strings and paste the second value into Text B. Either field may be empty.

  3. Compare

    Choose Compare strings. Read Exact sequence first, then the normalized comparisons and first-difference table.

  4. Decide

    Use the original code points to identify the cause. If a transformation is appropriate, preview it separately in Unicode Normalizer before applying it.

Four pairs with different explanations

Text A / Text BExactAfter NFCAfter NFKCMeaning
é / e + U+0301DifferentEqualEqualOne precomposed letter versus a combining sequence.
A / ADifferentDifferentEqualCompatibility conversion removes the fullwidth distinction.
A SPACE B / A NBSP BDifferentDifferentEqualNFKC collapses this spacing distinction. That may change wrapping.
Latin a / Cyrillic аDifferentDifferentDifferentSimilar shapes do not make the characters normalization-equivalent.
Copy as Text A. Use the next sample as Text B.
é
Text B: U+0065 followed by U+0301. These are actual characters, not escape notation.
é

For the accent pair, the first difference is at code-point position 0 and UTF-16 offset 0: U+00E9 in Text A, U+0065 in Text B. The report stops at the first difference. It does not claim that every following character is wrong or compute an insertion/deletion alignment.

Read positions without splitting emoji

Positions start at zero. Code-point position counts each encoded value, while UTF-16 offset counts JavaScript string units. In 😀A versus 😀B, the differing letter is at code-point position 1 but UTF-16 offset 2. If one string ends first, the report says End of text and gives that input’s length as its offset.

What equal does and does not establish

Exact equality means the original sequences match. After NFC or After NFKC means only that those particular normalized results match. Neither result certifies a display name, detects all look-alike characters, guarantees matching font rendering, or determines a database’s collation. Case, punctuation and invisible characters still need attention.

Each field accepts up to 10,000 UTF-16 units. An isolated surrogate can be compared exactly, but its normalization result and UTF-8 byte count are unavailable. Grapheme counts require Intl.Segmenter. Browser text fields fold CRLF and CR to LF, so compare original file bytes outside a textarea when newline fidelity matters. Text is not uploaded, saved, or placed in the URL.

Sources and method

Copy manually

Couldn’t copy automatically. Select the text below and use your device’s Copy command.

Use your device’s Copy command, then paste the text where you need it.

Character details

Code points
UTF-8 bytes
View character details

Appearance can vary by font.

Your saved symbols

Save symbols for another visit in this browser. They won’t appear on your other devices or browser profiles.