Punycode (IDN) Encoder + Decoder
Domain names can contain Unicode characters (café.com, 例え.jp) but DNS servers and many systems only accept ASCII. Punycode is the standard encoding that maps Unicode domains to ASCII (xn--caf-dma.com). This tool converts in both directions and flags potential homograph attacks (look-alike Unicode characters that could spoof legitimate domains).
How to use the Punycode (IDN) Encoder + Decoder
Pick a direction. Unicode → Punycode takes café.com and produces xn--caf-dma.com. Punycode → Unicode decodes xn--caf-dma.com back to café.com. The homograph warning fires when the Unicode form contains characters from non-Latin scripts that look like Latin letters (a common phishing tactic).
About Punycode (IDN) Encoder + Decoder
Punycode (RFC 3492) is a Bootstring-based encoding designed specifically for internationalized domain names. It converts a Unicode string into an ASCII string that uses only letters, digits, and hyphens. The result is prefixed with xn-- to mark it as a Punycode-encoded label.
IDN (Internationalized Domain Names) is the broader system that lets Unicode characters appear in domain names. DNS servers and most networking code only handle ASCII, so domain registrars accept Unicode at the user level but store and transmit the Punycode form. Modern browsers display the Unicode form to users for trusted scripts and the Punycode form for suspicious ones.
The homograph attack exploits visual similarity between Unicode characters from different scripts. apple.com typed with Cyrillic "а" (U+0430) instead of Latin "a" (U+0061) looks identical but is a different domain. Browsers mitigate by showing Punycode for mixed-script domains; this tool flags such cases so you can spot them.
Common use cases
- Domain registration — see what your "international" domain will actually look like in DNS.
- Email validation — handle IDN email addresses correctly.
- Phishing detection — verify a suspicious-looking domain is not a homograph spoof.
- Decoding logs — Punycode-encoded domains in firewall / DNS logs.