# Punycode / IDN Converter

Convert internationalized domain names between Unicode and their xn-- ASCII form as you type. Paste a domain, a URL or an email address; everything runs in your browser.

## Short answer

Punycode (RFC 3492) writes a Unicode label using only letters, digits and hyphens, and IDNA adds the prefix `xn--`, so `bücher.example` is stored in DNS as `xn--bcher-kva.example`. After conversion each label may be at most 63 characters long (RFC 1035).

### Method

Conversion works label by label. The label's ASCII characters are copied first, followed by a hyphen if there were any; each non-ASCII character is then encoded as a variable-length base-36 number recording which code point to insert and where, using the constants fixed in RFC 3492 (base 36, tmin 1, tmax 26, skew 38, damp 700, initial bias 72, initial n 128). Before that, domain input gets the IDNA mapping browsers apply (UTS #46): fullwidth letters and the ideographic full stop become their ASCII forms and the name is lower-cased.

### Worked example

`bücher`: copy `bcher`, add `-`, then encode ü (U+00FC) inserted at position 1 as `kva`, giving `bcher-kva`; so `bücher.example` becomes `xn--bcher-kva.example`. In the other direction, `xn--wgv71a119e.jp` decodes to `日本語.jp`.

### Limits

- Length and characters are checked, but not every IDNA2008 rule (for example the contextual rules for joiners); each registry also has its own list of allowed characters.
- Mixed-script names are flagged as possible look-alikes; a look-alike written in a single script, such as all-Cyrillic letters resembling a Latin word, is not detected.

### Sources

- [RFC 3492: Punycode](https://www.rfc-editor.org/rfc/rfc3492): the algorithm and its constants.
- [RFC 5890: IDNA Definitions](https://www.rfc-editor.org/rfc/rfc5890): the xn-- prefix and A-labels.
- [RFC 5891: IDNA Protocol](https://www.rfc-editor.org/rfc/rfc5891): how names are converted for DNS.
- [Unicode UTS #46: IDNA Compatibility Processing](https://www.unicode.org/reports/tr46/): the mapping browsers apply.
- [RFC 1035, section 2.3.4: Size limits](https://www.rfc-editor.org/rfc/rfc1035#section-2.3.4): 63 octets per label.

## What it does

This converter translates internationalized domain names (IDNs) between the form people read and the form the DNS stores. Type `bücher.example` and you get `xn--bcher-kva.example`; paste an `xn--` name and you get the Unicode original. It works in both directions as you type, label by label, so in `shop.bücher.example` only the label with non-ASCII characters gains the `xn--` prefix.

The encoding is Punycode (RFC 3492), implemented in JavaScript inside your browser; nothing you type is sent anywhere. Before encoding, the tool lowercases each label and applies Unicode NFC normalization, so a precomposed ü and a u followed by a combining diaeresis give the same result. It does not apply every IDNA2008 or UTS #46 mapping rule, so a successful conversion is a correct encoding, not proof that a registry will accept the name.

Next to the result you get a breakdown of every label (Unicode form, ASCII form and length), a check against the DNS limits of 63 octets per label and 253 for the full name, and a warning when a single label mixes scripts, such as Latin with Cyrillic or Greek.

## How to use it

1. Type or paste a domain name, a full URL or an email address.
2. Watch the converted form update: Unicode input yields the `xn--` form, and `xn--` input yields Unicode.
3. Read the label breakdown for lengths, limit errors and any mixed-script warning.
4. Copy whichever form the destination expects.

With a URL, only the host is converted; the rest stays as entered. (On the web, non-ASCII characters in a path or query string are percent-encoded as UTF-8, not converted to Punycode.) With an email address, only the part after the @ is converted. A local part such as `jürgen` has no Punycode form; delivering mail to it requires SMTPUTF8 support (RFC 6531) on every server along the way.

## Use cases

- **Checking a suspicious link.** Paste a URL from a message before opening it. If the host decodes to letters from two scripts, or a familiar-looking name turns out to be an `xn--` label, look closer before clicking.
- **Writing DNS records.** Zone files and most DNS hosting panels expect the ASCII form. Use that exact string wherever a record refers to the name, including CNAME targets and MX hosts.
- **Requesting TLS certificates.** Certificate authorities and ACME clients take the `xn--` form in subject alternative names. Decoding a certificate's SAN list shows which Unicode names it really covers.
- **Reading logs.** Web server logs, HTTP Host headers and TLS SNI values carry the encoded name. Decode an unfamiliar entry to read it.
- **Setting up mail for an IDN.** MX, SPF, DKIM and DMARC records all sit under the `xn--` name, and an address like `info@xn--bcher-kva.example` works with ordinary mail software.
- **Checking length before registering.** Encoding expands some scripts considerably: the seven-character Thai label ภาษาไทย becomes `xn--o3crh0a8bb0k`, 16 octets, so a label that looks short can still exceed 63.

Records and a certificate signing request for `bücher.example` use the encoded name like any other host name:

```
xn--bcher-kva.example.      3600 IN A     192.0.2.10
www.xn--bcher-kva.example.  3600 IN CNAME xn--bcher-kva.example.
xn--bcher-kva.example.      3600 IN MX    10 mail.xn--bcher-kva.example.

openssl req -new -key site.key -out site.csr \
  -subj "/CN=xn--bcher-kva.example" \
  -addext "subjectAltName=DNS:xn--bcher-kva.example,DNS:www.xn--bcher-kva.example"
```

## How Punycode fits Unicode into a host name

Strictly, the DNS wire format can carry any byte values. In practice, host names have been limited to ASCII letters, digits and the hyphen since the 1980s (the LDH rule of RFC 952 and RFC 1123), and resolvers, mail servers and certificate checks were built on that assumption. Rather than change them, IDNA converts names inside the application, before any query is sent, into a string that already obeys the old rule.

Punycode works in two stages. First it copies the label's ASCII characters in order and adds a hyphen if there were any: `bücher` gives `bcher-`. Then it describes each missing character as one number that says which code point to insert and where. The ü is U+00FC, decimal 252. Counting up from 128, with five letters already placed and therefore six possible insertion slots, the number is (252 − 128) × 6 + 1 = 745, where the final 1 means after the first letter. That number is written in a variable-length base-36 form using a–z and 0–9, with thresholds that adapt so small numbers stay short. It comes out as `kva`, giving `xn--bcher-kva`.

Decoding reverses this: everything before the last hyphen is copied, and the characters after it are read back as insertions. A label with no ASCII letters, like the Thai one above, has no separating hyphen after the prefix. Because the encoded label is what travels through DNS, the 63-octet limit applies to it, not to the Unicode text.

## Look-alike domains and the address bar

Many letters in different scripts look identical. The Cyrillic а (U+0430) matches the Latin a in most fonts, so `bаnk.example` with a Cyrillic second letter reads as an ordinary word yet encodes to `xn--bnk-6cd.example`. This is a homograph attack.

Browsers decide label by label whether to show Unicode or the `xn--` form. Policies differ by vendor, but common tests include whether a label mixes scripts in combinations real names rarely use, whether it is spelled entirely in letters that imitate Latin ones, and whether it closely resembles a well-known domain. In Firefox, setting `network.IDN_show_punycode` to true in `about:config` forces the ASCII form for every name.

The mixed-script warning here looks for more than one script inside a single label. A label spelled entirely in Cyrillic letters that resemble Latin ones is not mixed, so a clean result does not prove a name is genuine. Compare the decoded name with the address you expected, and when in doubt type the address yourself.

## Frequently asked questions

**Why does my browser show xn-- instead of the real name?**

Browsers display Unicode only when a label passes their display policy. If it mixes scripts in unusual ways, is written entirely in characters that imitate Latin letters, or looks too much like a well-known domain, the browser shows the encoded form instead. The site still loads normally; paste the name here to see what the xn-- label decodes to.

**Is a domain that starts with xn-- dangerous?**

No. The prefix only means the label was encoded from Unicode, and many legitimate sites in German, Chinese, Arabic, Russian and other languages use it. What matters is the decoded text. If it spells the name you expected in a single script, there is nothing unusual about it. If it imitates a familiar name with borrowed letters, treat the link with caution.

**Why does another converter give a different result for a name containing ß?**

Older IDNA2003 processing, and the transitional mode of UTS #46, map ß to ss and the final sigma ς to σ before encoding, so straße becomes plain strasse. IDNA2008 keeps those characters as they are. Lowercasing and NFC, the steps this tool applies, leave ß unchanged, so faß encodes to xn--fa-hia here. Check which form your registry and your users' software expect.

**Can I put Unicode directly into a zone file or certificate?**

Use the xn-- form in both. A certificate stores DNS names in an ASCII-only field, so certificate authorities expect the encoded form in the subject alternative name list. In a zone file, a name written with raw UTF-8 bytes would not match the xn-- queries that resolvers and browsers send, so the record would simply never be found.

**What happens to the part before the @ in an email address?**

It is left exactly as you typed it, because Punycode applies only to domain names. If the local part contains non-ASCII characters, such as jürgen, delivery depends on the SMTPUTF8 extension defined in RFC 6531. Every server along the path has to support it; there is no ASCII fallback comparable to Punycode, so a message to such an address usually bounces where support is missing.

**Why might a registry reject a name this tool converts without complaint?**

The tool performs a correct RFC 3492 encoding after lowercasing and NFC normalization, but it does not implement every IDNA2008 or UTS #46 rule. IDNA2008 disallows most symbols and has context rules for characters such as joiners, and each registry publishes its own table of permitted characters for its top-level domain. A name can encode cleanly here and still fail those checks.

**Is anything I type sent to a server?**

No. Conversion, length checks and the mixed-script warning all run in JavaScript inside your browser, so the names, URLs and email addresses you paste never leave your device. Beyond that, iseeu.cc keeps no logs of IP addresses or lookups and no database of visitors, sets no cookies and shows no ads.

A clean conversion shows the name is encoded correctly, not that it is registrable or safe. Registries apply their own character rules, and look-alike names can avoid mixing scripts.

## Related tools

- [DNS lookup](https://iseeu.cc/dns-lookup/) ↵ A, AAAA, MX, TXT, NS, CNAME, CAA and SOA records over DNS-over-HTTPS.
- [WHOIS / RDAP lookup](https://iseeu.cc/whois/) ↵ Registration data for domains, IP addresses and AS numbers.
- [Email header analyzer](https://iseeu.cc/email-header-analyzer/) ↵ Trace the Received chain and read SPF, DKIM and DMARC results.
- [Security headers check](https://iseeu.cc/headers-check/) ↵ Fetch a URL's response headers and grade HSTS, CSP and the rest.
- [What is my IP](https://iseeu.cc/) ↵ Your IP address, location, network, request headers, TLS and leak checks on one page.

[Browse all tools](https://iseeu.cc/tools/)

Last updated: 2026-10-11

Source page: https://iseeu.cc/punycode/
