Punycode Converter
Convert internationalized domain names (IDN ↔ ASCII).
About this tool
Punycode (RFC 3492) is the encoding the DNS system uses to represent non-ASCII characters in domain names. The Cyrillic name пример.рф becomes xn--e1afmkfd.xn--p1ai in actual DNS queries; a Chinese 例え.テスト becomes xn--r8jz45g.xn--zckzah. The translation is fully bidirectional — paste either form, get the other. Our tool handles a single label, a full domain, or several space-separated domains in one go.
The encoding is part of the IDNA standard (Internationalized Domain Names in Applications). Browsers, mail servers, and TLS libraries do this conversion under the hood — but the moment you debug a DNS issue, configure a firewall rule, or sign an SSL certificate, you usually need the punycode form yourself. The xn-- prefix is a fixed marker that says "this label is punycode-encoded".
When to use this tool
- Inspecting a suspicious link. Phishing campaigns disguise URLs by mixing scripts — decode any link to see whether
раypal.comis really PayPal or a Cyrillic look-alike (the homograph attack). - SSL certificates for IDN domains. Most CAs require the punycode form as the SAN.
- Firewall and DNS configs. Routers, BIND, and most allow-lists need the ASCII form — the human-friendly Unicode is for the browser address bar, not the config file.
- Email DNS records. SPF, DKIM, and DMARC records all reference the punycode form of the domain.
About homograph (look-alike) attacks
Unicode has many characters that visually resemble Latin letters — Cyrillicа (U+0430) vs Latin a (U+0061), Greek ο vs Latin o. Punycode reveals these instantly: a "legitimate" example.com rendered with mixed-script characters becomes something like xn--exampe-9he.com in punycode. If a familiar domain decodes to something with an xn-- prefix, suspect homograph spoofing.
Frequently asked questions
What is the xn-- prefix?
xn-- is meant to be decoded to Unicode before being shown to humans. The prefix has been reserved exclusively for this purpose since IDNA-2003; you can rely on it to distinguish real Unicode names from accidental matches.
Does this protect me from look-alike domains?
xn-- while the displayed text looks purely Latin, that is a homograph attack — Cyrillic, Greek, or Armenian characters disguised as Latin. Modern browsers display punycode form themselves when scripts are mixed, but if you have any doubt about a URL you received, decoding it here gives a definitive answer.
Why do TLDs sometimes have xn-- too?
.рф (Russia), .中国 (China), .укр (Ukraine), .한국 (Korea), and dozens more. Each of these resolves to a punycode equivalent (.xn--p1ai, .xn--fiqs8s, .xn--j1amh, .xn--3e0b707e). When a domain uses both an IDN label and an IDN TLD, both segments will start with xn--.