Pikkola Punycode, tool No. 84

The address a person reads, and the one DNS keeps.

Type a domain and see both forms: the one written in its own script and the ASCII form that starts with xn--. The same pass says which characters are not what they look like, which is how a Cyrillic a becomes an Apple login page.

RFC 3492
the algorithm
16
brands watched
0
uploads

The address bar

Convert it, then check what it looks like

The conversion is RFC 3492, the algorithm under every xn-- label. The check around it is the part worth reading: a domain can be valid, resolvable and a perfect imitation at the same time.

https:// nothing to flag
A-label

-

What goes into DNS

U-label

-

What a person reads

Each label on its own
# Unicode A-label Script Bytes
ASCII
-
IDN labels
0
Labels
0
TLD
-

A label may be 63 bytes.

One algorithm, one attack, one limit

Punycode was written to put any script into ASCII, and the same arithmetic that makes a Korean name work makes an imitation possible.

01

Bootstring, not encryption

Each non-ASCII code point is written as a delta from the previous one, in base 36, after the ASCII part and a hyphen. It is a numbering scheme: nothing is hidden, and every xn-- label decodes back exactly.

02

One word, two scripts

The attack is not in the algorithm but in the fonts. A label that mixes Latin with Cyrillic or Greek resolves to a real, registerable domain that prints like a brand name, and neither the DNS nor the certificate is wrong.

03

Sixty-three bytes, not characters

The DNS limit is bytes per label and bytes for the name. Hangul costs three, most Latin one, and an emoji four, so the character count that looks fine in an editor can be over the line in the wire format.

What is converted, and what is only checked

This page implements the conversion and the checks around it. It does not implement the full IDNA mapping table, and it says where that matters rather than implying a completeness it does not have.

Part What this page does What it will not do
A Unicode label Normalised to NFC, then encoded to an xn-- label Apply the full UTS 46 mapping (width, case folding, deviation characters)
An xn-- label Decoded back to its code points Guess at a truncated encoding: a decode that fails is reported as a failure
The upper case Lowercased, because DNS is case-insensitive Preserve a case distinction the protocol does not have
Byte limits 63 per label and 253 for the name, counted in bytes Count characters and call it close enough
The lookalike check Folds Cyrillic, Greek and a few digits to their Latin shapes and compares with sixteen brands Know every homograph: the full confusables table is far larger
The certificate Nothing: this page reads a name Tell you whether a browser will trust the site

A name that passes every check here can still be a phishing site, and a name that trips the lookalike warning can be a legitimate business that owns a Cyrillic word. The page reports shapes and limits; the decision is yours.

Field guide

Addresses and the letters that lie

Punycode exists so that a name written in any script can travel through a protocol that only carries ASCII. The same property that lets a Korean name be reachable lets a Cyrillic letter stand where a Latin one is expected. These are the mechanics on both sides.

What the xn-- label actually is

An internationalised domain name is stored as a set of labels, and a label that contains characters outside ASCII is converted to an A-label that starts with xn--. The conversion is defined in RFC 3492, an instance of a general algorithm called Bootstring. The ASCII characters in the label are written first, a hyphen follows, and then each non-ASCII code point is written as a delta from the previous one, in base 36 using a to z and 0 to 9, with the deltas adapted by a bias that keeps small numbers short.

There is no key and no secrecy in it. bcher-kva is bücher and nothing else, and any resolver decodes it the same way. That matters for reading a certificate: the name on it is an A-label, so a certificate for xn--pple-43d.com is a valid certificate for a domain that prints as аpple.com with a Cyrillic first letter.

The homograph attack is a font problem

Unicode contains many characters that share a shape and differ in code point. Cyrillic а (U+0430) and Latin a (U+0061) are the standard example; Greek ο (U+03BF) and Latin o are another, and the full confusables table in Unicode's security annex runs to thousands of pairs. A label that mixes Latin and Cyrillic in one word is legal under IDNA and resolvable, so an attacker can register a name that prints as a brand and is a different string in DNS.

Browsers responded by displaying such labels in their A-label form when a label mixes scripts, which is why pasting an address sometimes changes it in the bar. The rule is a heuristic and it differs between browsers and versions, which is exactly why a page that shows both forms is useful before you click: the ASCII form is what the connection uses, and it cannot be disguised by a font.

Bytes, not characters

The DNS limit is 63 octets per label and 253 for the whole name in its wire form. A Korean syllable is three bytes in UTF-8, a Cyrillic letter two, an emoji four, and the A-label adds the prefix and a delta encoding on top. A name that looks like eighteen characters in an editor can therefore be over the limit, and the error a registrar returns says "label too long" rather than naming the reason. The label table here counts the A-label bytes per label, because that is the number the registry checks.

What IDNA2008 adds, and this page does not

The conversion in RFC 3492 is not the whole of internationalised domain handling. IDNA2008 adds a mapping step (full-width to half-width, case folding, some deviation characters), a table of code points that are allowed, disallowed or only contextually allowed, and rules about which scripts may be mixed. A browser implements all of it; this page implements the conversion plus the checks a person can act on. A name that converts here can still be rejected by a registry, and a name a registry accepts can still be a lookalike.

When the question is what the name resolves to, Pikkola DNS reads the records. When it is whether you reached the right server, Pikkola SSL reads the certificate, whose subject is always an A-label.

Questions

Is my domain sent anywhere?

No. The conversion, the limit checks and the lookalike comparison are functions in this tab. Nothing is resolved, nothing is looked up, and the only request after the page loads is the cookieless page-view count.

Why does a browser show xn-- when I paste some addresses?

Because a name that mixes scripts in one label is displayed in its encoded form to stop a homograph from passing for a familiar brand. The rule varies: a name entirely in one script is usually shown as written, while a Latin label with a Cyrillic letter in it is not. This page shows both forms so the difference is visible before the browser decides.

Is punycode a kind of encryption?

No, and the mistake matters. It is a reversible base-36 encoding of code points, with no key and no secrecy. Anyone can decode an xn-- label, which is why a decoded name is evidence and not a secret.

Does this page implement IDNA2008?

It implements the conversion from RFC 3492 and the checks a person needs around it: normalisation to NFC, byte limits, hyphen rules, script mixing and lookalike shapes. The full IDNA2008 process also maps width and case, rejects some code points outright and needs a Unicode version; that is a library, not a page.

Why is my Korean domain over the limit?

Because each Hangul syllable is three bytes in UTF-8, and the ASCII form after encoding is longer again. A label of about twenty Korean characters reaches 63 bytes, so the shorter name is usually the one that works. The label table shows the byte count per label rather than making you count.