1001Ferramentas
🌐Converters

Punycode / IDN Converter

Convert an internationalized domain name (IDN) into the Punycode (xn--) form that DNS uses. Useful for accented domains and for comparing lookalike addresses.

Punycode

Why a domain with an accent turns into xn--

DNS was designed back when nobody pictured a domain written in Japanese or Russian. It only understands ASCII letters, digits and hyphens. For "café.com.br" to work anyway, there is IDNA: before the name goes out on the wire, it gets translated into an equivalent ASCII form, always starting with xn--. That is why café.com.br becomes xn--caf-dma.com.br and ПРИМЕР.РФ becomes xn--e1afmkfd.xn--p1ai.

Here you type the domain the way a person sees it and get back the form the name servers actually use. The conversion is done by the browser itself, with the same IDNA implementation it applies when you type an address in the bar — normalization included, which lowercases and folds equivalent characters before encoding. Each label between dots is encoded on its own, and labels that are already ASCII pass through untouched.

The road here runs one way: paste an xn-- and you get the same xn-- back, because that already is the ASCII form. Where it earns its keep is in filling fields that reject accented characters — certificate SANs, zone records, firewall allowlists, SPF configuration — and in comparing lookalike domains, since two names that look identical on screen can have completely different punycode forms.

Frequently asked questions

Can I convert an xn-- name back to the accented version?
Not on this page. It uses the browser URL parser, which always returns the ASCII form: if the input is already punycode, the output matches the input. To read an xn-- you need a punycode decoder, or you can simply paste the domain into the address bar, which shows the readable name whenever the registration is considered safe.
Why did the result come out in lowercase?
Because normalization is part of the process. DNS does not distinguish upper from lower case, and IDNA applies a mapping (UTS-46) before encoding. ПРИМЕР and пример both produce xn--e1afmkfd, which is exactly the behaviour you want: they point at the same record.
Does this help spot a fake domain?
It helps, but it does not decide on its own. A homograph attack uses letters from another alphabet that look Latin — a Cyrillic "а" standing in for "a". On screen the two names look the same; in punycode, the fake one shows up with xn-- and the real one does not. Comparing the two forms exposes the difference, but the final call still means checking the registration and the certificate.

Related Tools