Look-alike (homoglyph) characters: Latin a vs Cyrillic а

The word looks right. The computer says it is a different word. One of the letters came from another alphabet.

Pairs you will actually meet

Each row below uses the real characters. In a font that distinguishes them poorly they look identical; the code points do not.

Looks likeLatinCyrillic (and others)
aU+0061 aU+0430 а
eU+0065 eU+0435 е
oU+006F oU+043E о, Greek U+03BF ο
pU+0070 pU+0440 р
cU+0063 cU+0441 с
xU+0078 xU+0445 х
yU+0079 yU+0443 у
i / l / 1U+0069 i, U+006C l, U+0031 1also U+0131 ı (dotless i), U+0049 I
0 / OU+0030 0, U+004F OU+041E О

A whole brand name can be spelled with look-alikes: a string that prints as “apple” may contain no Latin letters at all. Browsers often show such domain names in punycode, starting with xn--, which is the giveaway.

Where they cause trouble

How to tell letters apart

// JavaScript: list script-agnostic code points
[...text].map(c => "U+" + c.codePointAt(0).toString(16).toUpperCase().padStart(4, "0") + " " + c)

# Python
print([f"U+{ord(c):04X} {c}" for c in text])

Paste the suspicious string next to one you typed yourself in the text diff — the look-alike letters show as changes. Anvil /v1/text/inspect reports homoglyph and mixed_scripts findings on non-secret text. What is this? is a first pass if you are not sure what you pasted.

This is not the same problem as a hidden zero-width character or a non-breaking space. Those add marks you cannot see; a homoglyph substitutes a mark you can see.

Related

Who owns this link · Invisible zero-width characters · Strings that look the same but are not equal · Invisible characters in a password · Anvil text X-ray · Anvil link X-ray · Wirebook: fake messages

Questions

What is a homoglyph?

A character that looks like a different character but has another code point, such as Latin a (U+0061) and Cyrillic а (U+0430). They print the same in many fonts and compare as not equal.

How do look-alike letters appear in a web address?

Internationalised domain names can use letters from other alphabets. Browsers often display mixed-script names as punycode starting with xn--, which is a sign the name is not the simple word it resembles.

How can I check a string for homoglyphs?

List every code point (see the snippets above), paste it next to a trusted copy in the text diff, or send non-secret text to Anvil /v1/text/inspect, which flags homoglyph and mixed_scripts.

Is every mixed-script name a scam?

No. People write real names and words that mix Latin with another alphabet. Treat mixed scripts and xn-- domains as a reason to look more carefully, not as proof.

Are homoglyphs the same as invisible characters?

No. Invisible characters (zero-width spaces, bidi marks) add something you cannot see. Homoglyphs replace a letter with a look-alike you can see. Both break equality; they need different checks.

Published .

Try it

Related guides

Newest guides