About this tool
Punycode is a representation algorithm defined by the Internet Engineering Task Force (IETF RFC 3492) that transforms Internationalized Domain Names (IDNs) containing non-ASCII characters into the ASCII-Compatible Encoding (ACE) syntax prefixed with 'xn--'. This tool offers bidirectional, lossless conversion between native Unicode domains and Punycode strings, facilitating DNS record configurations, Nginx/Apache virtual host setup, and cybersecurity audits against IDN homograph phishing attacks.
How to Use This Tool (Step-by-Step)
Input Unicode Domain or Punycode String
Enter native language domains (e.g., 'münchen.de', '测试.cn') or strings starting with 'xn--'.
Instant Bidirectional Conversion
The parser detects domain labels, encodes Unicode characters, or decodes Punycode back to readable scripts.
Copy Verified DNS-Ready String
Instantly copy the ACE format ready for injection into Cloudflare, Route 53, or bind configuration files.
RFC 3492 Compliance
Strictly adheres to the official Bootstring architecture for seamless interoperability with global root DNS servers.
IDN Homograph Phishing Defense
Inspect lookalike Cyrillic or Greek spoofed domains to prevent credential harvesting and brand impersonation.
Local Offline Execution
Transcoding is performed client-side without sending queries over the network, safeguarding unpublished domains.
Punycode Configuration & DNS Best Practices
- •DNS Provider Requirement: Authoritative DNS registrars (such as AWS Route 53, Cloudflare, Namecheap) require host records to be submitted in the 'xn--' Punycode representation.
- •SSL/TLS Certificate SANs: When generating Certificate Signing Requests (CSRs) for Let's Encrypt or DigiCert, the Subject Alternative Name (SAN) must use the ACE Punycode syntax.
- •Browser Address Bar Fallback: Modern browsers automatically display domains in Punycode if the script combination violates security policies to prevent Unicode homograph exploits.
Code & Transformation Examples
Unicode Domain to Punycode (For DNS Records)
中文域名.cnxn--fiq228c70d65e.cn* When configuring DNS records with Cloudflare or Route 53, submit host records in the xn-- format.
Modern JavaScript URL API Handling
https://中文域名.cn/apixn--fiq228c70d65e.cn* Modern JavaScript engines transcode internationalized hostnames automatically under the hood.
Frequently Asked Questions
Q: Why does my internationalized domain sometimes show as xn-- in the browser address bar?
A: This is an anti-spoofing security mechanism. Modern browsers automatically display the ACE punycode format if characters could be used for homograph phishing attacks.
Q: Should I configure Nginx server_name using Chinese or Punycode?
A: Always use the Punycode format. Web servers match virtual hosts against the raw HTTP Host header, which clients transmit in the ASCII xn-- format.
Q: What characters does Punycode use, and is it case-sensitive?
A: Punycode exclusively uses lowercase a-z, 0-9, and hyphens. Case is insensitive under standard DNS specifications, with lowercase universally recommended.