Skip to content
yutils
Example

Input (Unicode domain)

한글.kr

Output (ASCII)

xn--bj0bj06e.kr

Note

The `xn--` prefix marks a punycode-encoded label. DNS speaks ASCII only, so Korean / Chinese domains register in this form.

Usage / FAQ

When to use

  • Find the DNS-registered ASCII form of a Korean / Chinese / Japanese domain
  • Verify the IDN of an email sender
  • Analyze phishing domains — spot lookalike Cyrillic spoofs
  • URL normalization — map what users see to what DNS sees
  • Compatibility with ICANN and domain registry systems

FAQ

Q.Why does `xn--` appear?
A.It's the ACE (ASCII Compatible Encoding) prefix defined by IDNA. It tells DNS "this label is a converted IDN".
Q.What is a homograph attack?
A.Cyrillic `а` (U+0430) looks identical to Latin `a` (U+0061), enabling spoofs like `аpple.com`. Punycode reveals the trick: `xn--pple-43d.com`.
Q.Are email addresses converted too?
A.Yes — IDN addresses like `user@한글.kr` are converted to punycode in the domain part when passing through servers that don't speak SMTPUTF8 (EAI). The local part is independent.
Fun facts
  • Punycode was standardized in 2003 as RFC 3492 — the IDN (Internationalized Domain Name) encoding. It losslessly converts non-ASCII domains (like `한국.kr`) into ASCII-compatible form (`xn--3e0b707e`) that DNS can handle. It's the critical mechanism that let the internet accept non-ASCII domain names.

    RFC 3492 (2003)
  • At its core Punycode is the Bootstring algorithm by Adam Costello — emit the ASCII characters first, then compress the non-ASCII ones as 'delta + position' codes at the end. The `xn--` prefix marks an IDN; 'xn' stands for 'extended name' and is reserved by IANA.

    Wikipedia — Punycode
  • The homograph attack — Cyrillic 'а' (U+0430) looks identical to Latin 'a' but maps to a different domain via Punycode. Things like `xn--pple-43d.com` can render as `apple.com` for phishing, so Chrome and Firefox deliberately display mixed-script IDNs in raw Punycode form.

    Wikipedia — IDN homograph attack