Punycode Converter – Unicode to IDN Punycode | NetworkUstad

Domain names were born ASCII-only, but the world writes in many scripts, so internationalised domain names let a domain contain characters such as ü or ß. Underneath, DNS still speaks ASCII, so each non-ASCII label is encoded as Punycode with an xn-- prefix: münchen.de becomes xn--mnchen-3ya.de. That encoded form is what actually goes into DNS records, certificates, and browser address bars when the Unicode form cannot be used. This converter translates in both directions, label by label, so you can prepare a domain for registration or decode a suspicious-looking xn-- name back into readable characters.

Quick Answer: Enter a Unicode domain and click To Punycode, or an xn-- domain and click To Unicode.

Free Online Tool

Punycode Converter

Convert internationalised domain names between Unicode and Punycode (IDN) forms.

How to Use the Punycode Converter

  1. For encoding, type the Unicode domain, such as münchen.de.
  2. Click To Punycode and copy the xn-- form.
  3. For decoding, paste an xn-- domain.
  4. Click To Unicode and read the original characters.
  5. Check each label separately if a domain mixes scripts.
  6. Use the encoded form in DNS records and certificates.

Key Features

  • Encodes and decodes full domains, label by label.
  • Implements the Punycode algorithm in the browser, no library needed.
  • Handles mixed labels: ASCII labels pass through unchanged.
  • Preserves the domain extension exactly.
  • Validates input and reports malformed Punycode clearly.
  • Runs entirely in the browser; nothing leaves your device.

What the Result Means

The xn-- prefix is the signal that a label is Punycode, not a literal name, and the characters after it encode the Unicode code points, not the letters themselves. Decoding must return exactly the original Unicode label; if it does not, the Punycode was malformed or truncated. Note that two Unicode labels that look identical can encode differently if they use different scripts, which is exactly how homoglyph phishing works: always decode an unfamiliar xn-- name before trusting it.

Worked Example

The German city domain münchen.de encodes to xn--mnchen-3ya.de: the ASCII letters mnchen stay readable, the hyphen separates them from the encoded part, and 3ya records where ü belongs and what it is. Decoding xn--mnchen-3ya.de returns münchen.de exactly. The same round trip works for bücher.de, which becomes xn--bcher-kva.de, and a domain with only ASCII labels, such as example.com, passes through unchanged in both directions. For a multi-label domain such as shop.münchen.de, only the middle label is encoded, giving shop.xn--mnchen-3ya.de, which shows why the conversion works label by label rather than on the whole string at once.

Best Practices and Tips

  • Register and configure the Punycode form; the Unicode form is for display only.
  • Decode any xn-- link in an email before clicking, since lookalike scripts hide there.
  • Keep each label under 63 characters after encoding, which is the DNS limit.
  • Test the encoded domain in a browser to confirm it resolves to the right site.
  • Remember that the extension, such as .de, is never encoded.

Common Mistakes to Avoid

  • Putting the Unicode form directly into a DNS record.
  • Encoding the whole domain as one label instead of label by label.
  • Trusting an xn-- name without decoding it first.
  • Assuming two visually identical domains are the same domain.

Frequently Asked Questions

What does xn-- mean?

It marks a label as Punycode-encoded internationalised text, so DNS software knows to decode it for display.

Is Punycode encryption?

No. It is a reversible encoding, like Base64 for domain labels, and anyone can decode it.

Can a domain mix scripts?

Yes, label by label, but mixed-script domains are often flagged by browsers as suspicious.

Why is münchen.de encoded as xn--mnchen-3ya.de?

Because the ASCII part mnchen is kept, and the position and value of ü are encoded in the suffix 3ya by the Punycode algorithm.

Related Tools