About Punycode IDN
Encode unicode domains (<code>héllo.com</code>, <code>例え.jp</code>) to Punycode (<code>xn--hllo-bpa.com</code>, <code>xn--r8jz45g.jp</code>) and back. Per-label conversion (the <code>.com</code> stays ASCII). Useful when registering an IDN, parsing email addresses with non-ASCII domains, or auditing potential homograph attacks.
What Punycode encodes
The DNS protocol predates Unicode by decades. To support domains in any language without breaking the wire format, IDN (RFC 5891) defines an ASCII encoding called Punycode (RFC 3492). Per-label, the unicode form encodes to xn--<encoded>.
Modern browsers and email clients convert at the boundary — humans see Unicode, the network sees ASCII.
Common workflows
Register an IDN. Pick the unicode domain you want, encode to Punycode, register the encoded form at your registrar.
Audit DNS records. A hostname starting with xn-- is an IDN — decode to see the human-readable form. Useful when reviewing certificate transparency logs or domain reports.
Detect homograph risks. Decode an IDN, inspect the codepoints. Mixed Latin / Cyrillic in one label is a red flag.
Process email at scale. Email logs contain Punycode domains. Decoding makes them readable for analysis.
Mixed-script detection
Browsers protect against homographs by showing Punycode when a label mixes scripts (Cyrillic + Latin). The tool flags potential homograph cases so you can verify before trusting an IDN domain.
Frequently asked questions
Why does <code>héllo.com</code> need conversion?
xn--. Browsers and email clients display the unicode form to humans.What is a homograph attack?
аpple.com. Browsers detect mixed scripts and show the punycode form to flag suspicion.Can <code>.com</code> be unicode?
How does email handle this?
name@) follows different rules (RFC 6531 EAI). The domain part follows IDN. Most modern mail stacks convert to Punycode for SMTP transport.Browser display?
For emoji domains?
💩.la is a real (now defunct) emoji domain. Encodes to xn--ls8h.la.Related tools
Last updated: 2025-01-15