Encoders & Utilities

Punycode Converter

Convert internationalized domain names (IDN ↔ ASCII).

Domain or IDN Paste a domain in any script — we will convert to both Punycode (xn--…) and Unicode. Email-style user@host works too.
café.fr
Unicode → ASCII
Unicode form
café.fr
ASCII / Punycode form
xn--caf-dma.fr
Per-label breakdown
Unicode ASCII Scripts
café xn--caf-dma Latin
fr fr Latin

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.com is 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?

The "ACE prefix" — the fixed marker that identifies a DNS label as punycode-encoded. Any domain part starting with 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?

It exposes them. When you paste a suspicious link and the punycode form starts with 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?

Because IDN TLDs exist: .рф (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--.

Can I use mixed scripts in a single label?

Technically yes, but registries disallow it for security. ICANN's IDNA rules and most registries forbid mixing scripts within a single label (e.g. Latin + Cyrillic in the same word), specifically to defeat homograph attacks. The punycode encoder will still process the string, but the resulting domain would be unregisterable at any major registrar. Always use one script per label.