About the Punycode Converter
Domain names can be written in many scripts, but the DNS only understands ASCII, so internationalized names are stored in Punycode with an xn-- prefix: münchen.de becomes xn--mnchen-3ya.de. This Punycode converter translates whole domain names in both directions, label by label, which helps when registering a domain, configuring a server or checking a suspicious link that imitates a familiar brand with look-alike letters.
The domain is split at the dots and each label is handled separately: labels that are already plain ASCII are kept, while labels with other characters are lowercased, normalized to Unicode NFC and encoded with the Bootstring algorithm from RFC 3492, then given the xn-- prefix. Bootstring writes the ASCII characters of the label first, then a hyphen, then a compact code describing where each other character goes. Decoding reverses this for every label that starts with xn--. Full URLs and email addresses work too: only the domain part is converted.
Example: münchen.de converts to xn--mnchen-3ya.de, and xn--bcher-kva.example decodes to bücher.example. The Japanese test domain 例え.テスト is xn--r8jz45g.xn--zckzah.
Browsers show some IDNs in xn-- form to protect against look-alike phishing domains that mix scripts. For other encodings see the Unicode converter and the URL encoder, and to pull domains out of text the domain extractor.
How to use the Punycode Converter
- Choose the directionUnicode to Punycode, or Punycode to Unicode.
- Paste domainsOne per line; full URLs and email addresses work too.
- Read the resultEach label is converted separately.
- Use itPaste the xn-- form into DNS, hosting or certificate settings.
Punycode Converter features
- RFC 3492 Punycode
- Label-by-label xn-- handling
- Lowercasing and NFC normalization
- Several domains at once
- Works inside URLs and email addresses
- Decodes xn-- back to Unicode
- Runs in your browser
Common uses
- Setting up DNS for IDN domains
- SSL certificates for international domains
- Checking suspicious xn-- links
- Web hosting and email configuration
- Learning how IDNs work
Punycode in practice: an Urdu domain label, look-alike domains, hosting panels and certificates, and marketing an international domain
Punycode is how domain names in Urdu, Arabic, Chinese and other scripts travel through a DNS system that understands only ASCII. Most people never see it until something goes wrong: a browser shows xn-- instead of a name, a hosting panel rejects a domain or a look-alike address catches someone out. This guide converts an Urdu label and covers look-alike domains, hosting, certificates and the practical side of using an international domain.
A worked example: an Urdu label
The Urdu word اردو as a domain label converts to xn--mgbqf7g. The xn-- prefix marks it as Punycode, and the rest encodes the four letters in ASCII. Whether a particular domain extension accepts Urdu-script names depends on its registry's policy, so check with the registrar before planning a name; the conversion itself works for any label.
Look-alike domains
Some letters in other scripts look identical to Latin letters. A domain spelled entirely with Cyrillic letters that resemble apple converts to xn--80ak6aa92e.com, a demonstration that alerted browser makers in 2017. Browsers now show the xn-- form when a name mixes scripts suspiciously or imitates a known domain. Converting an address you are unsure of reveals whether any characters are not what they seem.
Hosting panels and DNS records
Some hosting control panels, DNS providers and server configuration files require the Punycode form of an international domain rather than the Unicode form. If adding a domain fails with an invalid name error, entering the xn-- version usually works. Web server configuration often needs the Punycode form for server names too.
Certificates
SSL certificates list international domains in their Punycode form. When checking a certificate's details, expect to see xn-- names rather than the readable version. Certificate tools and automated issuers handle this correctly, but knowing the form avoids confusion when comparing names.
Marketing an international domain
A domain in Urdu script is meaningful to Urdu readers but hard to type for anyone without an Urdu keyboard, and some apps display the xn-- form in links. Many organisations register an ASCII domain as their main address and use the international one as a memorable alias that redirects to it.
Links and search
Search engines display international domains in their readable form, and links work with either form. Choose one form for links you publish, and make sure the site redirects consistently to a single preferred address, so analytics and search signals are not split between two versions.
Case and normalisation
Before conversion, labels are lower-cased and normalised, so visually identical inputs produce the same Punycode. This is why converting a name typed differently can still give the same result. It also means two names that look different only in letter case are the same domain.
Checking unfamiliar links
When a link in a message looks slightly odd, converting its domain to Punycode is a quick check. A familiar-looking name that converts to an xn-- form contains non-Latin letters and deserves suspicion, especially if the message asks you to log in or pay.
Common mistakes
- Assuming every domain extension accepts Urdu-script names.
- Entering Unicode names where a panel expects Punycode.
- Using only an international domain for marketing.
- Ignoring xn-- warnings shown by browsers.
Related tools
To encode other parts of addresses, use URL Encoder. To inspect characters by code point, try Unicode Converter, and to pull domains out of text, Domain Extractor.
Reading logs and analytics
Server logs record the host name in its Punycode form, and some analytics tools show xn-- names in reports. Converting them back to Unicode makes reports readable, and confirms which domain a visit really came through when a site uses both an international and an ASCII address.
Sharing links in apps
Messaging and social apps differ in how they display international domains; some show the readable name and others the xn-- form. Before printing or sharing a campaign link widely, test how it appears in the apps your audience uses, and consider sharing the ASCII domain if the xn-- form looks suspicious.
Protecting a brand
Organisations sometimes register look-alike international domains themselves, so they cannot be used for phishing against their customers. Monitoring new registrations that imitate your brand, and checking suspicious ones by converting them, helps catch impersonation early.
Converting in code
Programming languages provide functions for this conversion rather than requiring hand-written code. Node.js offers url.domainToASCII and url.domainToUnicode, and Python has a built-in idna codec plus a separate package that follows the newer IDNA2008 rules. Using these keeps conversions consistent with browsers.
Typing international domains
Visitors type international domains in their own script, and browsers convert them to Punycode automatically before contacting the server. They never need to type the xn-- form. Printed materials should therefore show the readable name, with the ASCII alternative alongside for people using keyboards without that script.
Testing before launch
Before announcing an international domain, test it in several browsers, on phones and in the email and messaging apps your audience uses, and check that it redirects correctly to your main site. A short checklist run once at launch prevents confusion when the address starts appearing in advertisements.
Privacy
Conversion runs in your browser. The domains you enter are not sent anywhere or stored.
Frequently asked questions
What is Punycode?
An ASCII encoding defined in RFC 3492 that represents Unicode text using only letters, digits and hyphens. With the xn-- prefix, it lets domain names in any script work with the ASCII-only DNS.
How do I convert a domain to Punycode?
Paste the domain and copy the result: münchen.de becomes xn--mnchen-3ya.de. Only labels containing non-ASCII characters change; .de and other ASCII labels stay the same.
What does xn-- mean in a domain?
It marks a label encoded in Punycode, the ASCII-compatible form of an internationalized domain name. Decode it here to see the original characters. Browsers show the Unicode form when they consider it safe, and the xn-- form otherwise.
Are domain names case-sensitive?
No. Domains are case-insensitive, so IDN labels are lowercased before encoding. München.de and münchen.de map to the same Punycode. Both become xn--mnchen-3ya.de, which is what DNS actually stores.
Can I convert emoji domains?
Emoji are disallowed by the current IDNA2008 standard, although a few registries such as .ws accept them. This tool encodes them, but many browsers and registrars will not accept the result.
What is the difference between IDNA2003 and IDNA2008?
They are two versions of the rules for which characters are allowed and how they map. IDNA2008 is stricter; for example, it keeps ß and ς instead of mapping them to ss and σ.
Does it work for email addresses?
Yes, for the domain part: user@münchen.de becomes user@xn--mnchen-3ya.de. The part before @ is not converted, because internationalized local parts use a different standard (SMTPUTF8).
Why do browsers sometimes show xn-- addresses?
To protect against look-alike domains. If a name mixes scripts, for example Latin and Cyrillic letters that look identical, browsers display the Punycode form so that a fake site cannot pass as a familiar one. This trick is called an IDN homograph attack.
Can I convert a whole URL or email address?
Yes. Paste a full URL or email address and only the domain part is converted, while the scheme, user name, path and query are left exactly as they are. Each label between the dots is encoded separately, as the standard requires.