Punycode converter — international domain names to xn-- and back

Convert domain names with accents or non-Latin scripts into the xn-- Punycode form that DNS uses, or turn xn-- labels back into readable Unicode. Paste one domain per line, or whole URLs.

Live demo · real result from this tool
Direction

ASCII (Punycode)

xn--mnchen-3ya.dexn--bcher-kva.examplexn--r8jz45g.xn--zckzah

This applies RFC 3492 Punycode label by label with lower-casing and NFC normalisation. Full IDNA 2008 validation (which rejects some characters) is done by registries and browsers.

Processed on your device — nothing is uploaded.

How to use the Punycode converter

  1. Set Direction to To ASCII (xn–) or To Unicode.
  2. Paste into Domains (one per line). You can paste bare domains or full URLs such as https://bücher.de/path.
  3. Read the ASCII (Punycode) or Unicode result, one line per input line.
  4. Copy the result. For URLs, only the host part changes; the scheme, path and query stay as they were.

What it does and when to use it

The DNS system only accepts ASCII letters, digits and hyphens. Internationalized domain names (IDNs) such as münchen.de, bücher.example or 例え.テスト are stored in DNS in an ASCII form made with Punycode. You need the xn– form when you:

  • Add an IDN to DNS records, server configuration, SSL certificates or an allow-list.
  • Read logs, certificates or emails that show xn– names and want to know which domain they mean.
  • Check whether a link uses lookalike characters from another script.

For other parts of a URL, such as the path and query, Punycode is not used; those use percent-encoding, which the URL encoder handles. To identify a single suspicious character, paste it into the Unicode character lookup. To inspect a full URL piece by piece, try the URL parser.

How it works

For each line, the tool finds the host (from a URL, the part after :// and before any /, ?, # or :) and splits it into labels at dots. Full-width and ideographic dots such as 。 count as dots too.

To ASCII: each label is NFC-normalised and lower-cased. If it contains a non-ASCII character, it is encoded with the RFC 3492 Punycode algorithm: the ASCII characters are copied first, followed by a hyphen, then a compact code that records where each other character goes. xn-- is added in front.

To Unicode: each label starting with xn-- is decoded with the same algorithm in reverse.

The conversion runs in your browser; no DNS lookup is made.

Worked examples

münchen.de                    →  xn--mnchen-3ya.de
xn--r8jz45g.xn--zckzah        →  例え.テスト          (To Unicode)
https://bücher.de/path?q=1    →  https://xn--bcher-kva.de/path?q=1
MÜNCHEN.de                    →  xn--mnchen-3ya.de
example.com                   →  example.com

In the Japanese example both labels were Punycode, so both were decoded. The last two lines were pasted together: upper case was folded, and the ASCII-only domain was left as it was.

Limits and tips

  • The tool does not check whether a domain exists or is allowed under IDNA 2008. Use your registrar’s checker before buying.
  • Paths and query strings in URLs are not changed. Percent-encode them separately if needed.
  • Very unusual input that is not valid Punycode may produce an empty or odd label rather than an error, so double-check xn– values you did not create yourself.

Frequently asked questions

What does xn-- mean?
It is the ACE prefix that marks a domain label as Punycode. DNS only works with letters, digits and hyphens, so a label like münchen is stored as xn--mnchen-3ya. Browsers turn it back into münchen for display.
Why is only part of the domain converted?
Punycode works one label at a time, a label being the text between dots. Labels that are already plain ASCII, like de or com, stay as they are. Only labels with non-ASCII characters get the xn-- form.
Why did my capital letters become lower case?
Domain names are not case-sensitive, and Punycode itself does not record case. The tool lower-cases each label and applies Unicode NFC normalisation first, so MÜNCHEN and münchen give the same result.
Can I register any domain this tool converts?
Not necessarily. The tool applies RFC 3492 Punycode but not the full IDNA 2008 rules, which reject some characters, such as most symbols and emoji, and registries add their own rules. ☕.example converts to xn--53h.example here, but most registries will not accept it.
How can Punycode help spot fake links?
Some lookalike domains swap a Latin letter for a similar Cyrillic or Greek one. Converting a suspicious domain to ASCII shows an xn-- label where you expected plain letters, which is a warning sign.

Sources

  1. RFC 3492: Punycode — A Bootstring encoding of Unicode for IDNA — IETF / RFC Editor, accessed 2026-10-08
  2. RFC 5891: Internationalized Domain Names in Applications (IDNA): Protocol — IETF / RFC Editor, accessed 2026-10-08

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close