(Dokumentasjon på engelsk)
What it does
Converts internationalized domain names between Unicode and punycode - the ASCII form (xn-- labels) that DNS actually resolves. Type münchen.de and you get xn--mnchen-3ya.de, the name a registrar stores and a resolver queries. The reverse direction restores the Unicode display form. The tool runs the full RFC 3492 bootstring algorithm itself and follows the IDNA rule of encoding only labels that contain non-ASCII characters, so pure-ASCII labels pass through untouched.
How to use it
- Pick a direction: Unicode → Punycode or Punycode → Unicode.
- Type a domain, or tap an example chip:
münchen.de,日本.jp,xn--mnchen-3ya.de,bücher.example. - The result appears large and centered. Copy it, or copy a share link to your exact input.
The Swap button flips direction and carries the current output into the input. Encode a domain, tap Swap, and the tool decodes it back in one click.
Examples
| Input | Output |
|---|---|
münchen.de |
xn--mnchen-3ya.de |
Bücher.DE |
xn--bcher-kva.de - input is lowercased first, per IDNA |
café.fr |
xn--caf-dma.fr |
日本.jp |
xn--wgv71a.jp |
example.com |
example.com - pure ASCII passes through |
xn--mnchen-3ya.de |
münchen.de |
How punycode works
DNS speaks ASCII only. Resolvers, registries, and caches were all built on bytes, not Unicode. Yet people want domains in their own scripts, so an internationalized name travels in disguise: each non-ASCII label is compressed into an ASCII label prefixed xn--, and the browser shows the Unicode form only after the lookup succeeds. The prefix is the marker that says “decode me to recover the real label.”
The compression is the clever part. A label like münchen is mostly ASCII letters plus one outsider (ü). Punycode, defined in RFC 3492 as a bootstring algorithm, packs the outsiders and their positions into a compact suffix of base-36 digits and hyphens:
- Copy the ASCII characters through, in order:
mnchen. - Append a hyphen separator:
mnchen-. - Append delta-encoded values that name each inserted character and its position:
3ya.
The result, xn--mnchen-3ya, belongs to münchen alone - the algorithm is reversible, and encoding the decode always returns the same label. Decoding splits the label at the separator, replays the deltas, and reinserts each Unicode character at its recorded position.
Two wrap-up rules from IDNA: encoding lowercases the domain first, because domains compare case-insensitively and the ACE form is always lowercase. Decoding touches only labels that begin xn--; anything else passes through verbatim, so not--valid stays not--valid. One malformed xn-- label - a bad digit, a truncation, an overflow - rejects the whole domain, and the tool says so.
Good to know
- Private: all conversion runs 100% client-side - your domain never leaves the browser.
- Phishing watch:
xn--labels can imitate familiar names (homograph attacks). Browsers reveal the punycode form when scripts mix inside one label; this tool shows you exactly what any label hides. - Related tools: URL Inspector, HTML Entity Encoder, Slugify.