# Punycode / IDN Converter

Convert domain names between Unicode and Punycode (xn--) using UTS #46 non-transitional processing, label by label. Accepts Unicode names, Punycode, URLs and e-mail addresses (only the domain is converted). Returns the A-label and U-label forms, per-label length against the 63-octet limit, total length against 253, and clear errors for invalid Punycode, hyphen rules, bidi violations or IP-like endings. Warns about mixed scripts, lookalike (homograph) characters, emoji, silently remapped characters and names that differ under older IDNA2003 rules (ß, ς). Up to 500 names.

**Not for:** Checking whether a domain is registered (use whois_lookup or domain_availability).

- Tool id: `punycode-converter`
- Category: domain
- Execution: pure
- MCP tool `punycode_convert` at https://lookupowl.com/mcp
- REST `GET https://lookupowl.com/api/v1/tools/punycode-converter` (or POST a JSON body)
- OpenAPI: https://lookupowl.com/api/openapi.json

## Input

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `domains` | string | yes |  | One or more domain names, URLs or e-mail addresses, one per line (commas and spaces also separate), up to 500. Unicode names (bücher.de, 例え.jp, пример.рф) or Punycode (xn--bcher-kva.de). Only the domain part of a URL or e-mail address is converted. max length 65536 |

## Output

Results are wrapped in an envelope: `tool`, `version`, `requestId`, `data`, `summary`, `meta` (cache status, timing), `permalink`. `data` has these fields:

| Field | Type | Description |
|---|---|---|
| `items` | object[] |  |
| `totals` | object |  |
| `truncated` | boolean |  |

## Examples

### German umlaut to Punycode

```json
{"domains":"bücher.de"}
```

```bash
curl 'https://lookupowl.com/api/v1/tools/punycode-converter?domains=b%C3%BCcher.de'
```

Web page: https://lookupowl.com/punycode-converter?q=b%C3%BCcher.de

### Punycode back to Unicode

```json
{"domains":"xn--80ak6aa92e.com\nxn--e1afmkfd.xn--p1ai"}
```

```bash
curl 'https://lookupowl.com/api/v1/tools/punycode-converter?domains=xn--80ak6aa92e.com%0Axn--e1afmkfd.xn--p1ai'
```

Web page: https://lookupowl.com/punycode-converter?q=xn--80ak6aa92e.com%0Axn--e1afmkfd.xn--p1ai

### Lookalike (homograph) warning

```json
{"domains":"аpple.com"}
```

```bash
curl 'https://lookupowl.com/api/v1/tools/punycode-converter?domains=%D0%B0pple.com'
```

Web page: https://lookupowl.com/punycode-converter?q=%D0%B0pple.com

### ß versus ss

```json
{"domains":"Straße.de\nhttps://例え.jp/path\nbob@münchen.de"}
```

```bash
curl 'https://lookupowl.com/api/v1/tools/punycode-converter?domains=Stra%C3%9Fe.de%0Ahttps%3A%2F%2F%E4%BE%8B%E3%81%88.jp%2Fpath%0Abob%40m%C3%BCnchen.de'
```

Web page: https://lookupowl.com/punycode-converter?q=Stra%C3%9Fe.de%0Ahttps%3A%2F%2F%E4%BE%8B%E3%81%88.jp%2Fpath%0Abob%40m%C3%BCnchen.de

## Web pages

- https://lookupowl.com/punycode-converter

## Limits and caching

- Cost: 1 unit for a live lookup, 1 unit for a cached one. Budgets are per network and published in the `RateLimit` response headers.
- Cache: results are kept for 86400 s.
- Timeout: 1 s.

## Related tools

- [WHOIS Lookup](https://lookupowl.com/tools/whois-lookup.md): Registrar, creation and expiry dates, status codes, nameservers and DNSSEC for any domain, from RDAP with WHOIS fallback.
- [Domain Availability Checker](https://lookupowl.com/tools/domain-availability.md): Is a domain name taken? Checks one name under up to ten extensions, each answered by its registry, with honest caveats.
- [DNS Lookup](https://lookupowl.com/tools/dns-lookup.md): Look up A, AAAA, MX, NS, TXT, CNAME, SOA, CAA, DS and DNSKEY records from a public resolver or the authoritative nameserver.

## Guide: Punycode converter

Convert international domain names to the ASCII form DNS uses, and back.

### What Punycode is for

Host names on the internet can only use plain ASCII letters, digits and hyphens. International domain names (IDNs) such as `bücher.de`, `例え.jp` or `пример.рф` still work, because each non-ASCII label is encoded into ASCII that starts with `xn--`. A label is one dot-separated part of a name. The encoding is Punycode, and the ASCII result is called the A-label. The readable form is the U-label. Browsers usually show you the U-label. DNS, WHOIS, certificates and most config files expect the A-label.

| Unicode (U-label) | Punycode (A-label) |
|---|---|
| `bücher.de` | `xn--bcher-kva.de` |
| `münchen.de` | `xn--mnchen-3ya.de` |
| `例え.jp` | `xn--r8jz45g.jp` |
| `пример.рф` | `xn--e1afmkfd.xn--p1ai` |

### How to use the converter

1. **Paste names**: Enter one or more domains, one per line. Commas and spaces separate names too, and you can convert up to 500 at once. Unicode names, `xn--` names, full URLs and email addresses all work. Only the domain part is converted.
2. **Read both forms**: Each result shows what you typed and the `xn--` form, the scripts used, and the length against DNS's limits: 63 per label and 253 for the whole name. A Safe to use line says whether anything needs a second look.
3. **Check the warnings**: Mixed scripts, lookalike characters, emoji, characters the standard silently remaps and names that older software would treat differently are flagged before you register, buy or trust a name.

> **Using it from an AI assistant** Connect the LookupOwl MCP server, paste a list of unfamiliar domains from an abuse report or a log, and ask: “Which of these use lookalike characters?” The assistant calls `punycode_convert` on up to 500 names at once and gets each name in Unicode and `xn--` form, the scripts it uses and a warning for any name that imitates another one.

### Reading the result and the warnings

- **Plain ASCII.** A name that needs no conversion is shown as it is and marked as not an IDN.
- **Mixed script.** A label that mixes, say, Latin and Cyrillic letters is a classic sign of a lookalike (homograph) attack. The tool flags it, and many registries refuse such names.
- **Confusable characters.** Characters that look alike across scripts, such as Cyrillic `а` and Latin `a`, are flagged along with the name they imitate. `xn--80ak6aa92e.com` decodes to a Cyrillic imitation of a famous brand and can look identical to the real one in some fonts.
- **Remapped characters.** The standard rewrites some input, such as full-width letters and certain compatibility forms. The result may not be what you typed, and the tool says so.
- **ß, ς and joiners.** Older IDNA 2003 software treated the German sharp s, the Greek final sigma and two invisible joiner characters differently. When that gives a different domain, you see both versions.

> **Lookalikes are a real attack** Attackers register Punycode names that render like a bank or a shop. Decode an unexpected `xn--` link here before you click it, and use a bookmark or type the address for sensitive sites.

### Errors you may see

- **Invalid Punycode.** The part after `xn--` is malformed, decodes to plain ASCII or doesn't re-encode to the same string. Typos and cut-off names cause this.
- **Empty label or a hyphen in the wrong place.** `a..com` has an empty label, `-name.com` starts with a hyphen and `ab--cd.com` has hyphens in the third and fourth positions, which are reserved for `xn--`.
- **Label or name too long.** A label can be at most 63 characters once converted, and the whole name at most 253. Long Unicode labels reach the limit sooner than you'd expect, because Punycode needs extra characters.
- **Looks like an IP address.** A last label made only of digits, as in `foo.123`, would be read by browsers as an address, so the tool refuses it.
- **Characters that aren't allowed.** Domain names use letters, digits and hyphens. Most symbols and unassigned code points are refused. Spaces separate names, so a name can't contain one.
- **Mixed directions.** Mixing left-to-right and right-to-left text in ways the standard forbids is refused.
- **Underscore.** Underscores appear in DNS records such as `_dmarc` but aren't allowed in registrable names, so the tool warns about them.

### How the conversion works

Conversion runs on our server and makes no network lookup. Each label is mapped and validated with the UTS #46 rules that browsers follow (the current “non-transitional” version), then encoded with the Punycode algorithm and prefixed with `xn--`. Decoding does the reverse and checks that re-encoding gives back the same label, which catches many malformed names. LookupOwl adds its own checks for lengths, hyphens, digit-only endings and lookalikes.

Punycode keeps the plain ASCII characters of a label first, then adds a compact code that says where each other character goes and what it is. That is why `bücher` becomes `bcher-kva`: `bcher` is the ASCII part, and `kva` encodes the position and value of `ü`.

To learn who owns a converted name, run it through the [WHOIS lookup](https://lookupowl.com/whois). To see if it is free, use the [availability checker](https://lookupowl.com/domain-availability-checker).

### Standards

- **RFC 3492**: the Punycode encoding.
- **RFC 5890, RFC 5891, RFC 5892, RFC 5893 and RFC 5894**: IDNA 2008, covering definitions, the protocol, allowed code points, right-to-left rules and rationale.
- **UTS #46**: the Unicode mapping and processing rules browsers use.
- **RFC 1035 and RFC 1123**: the label and name length limits and host name syntax.
- **RFC 6531**: internationalised email addresses, relevant when the part before the @ is also non-ASCII.

### Frequently asked questions

**What does xn-- mean in a domain name?**

It marks a label that is Punycode-encoded. Everything after `xn--` is an ASCII encoding of a Unicode label, which software decodes to show the readable name. For example, `xn--bcher-kva` is `bücher`. Seeing `xn--` in a log, a certificate or a DNS record just means the name is international.

**How do I convert a domain to Punycode?**

Paste it above. You get the `xn--` form to use in DNS records, WHOIS queries, server configuration or certificate requests. Paste an `xn--` name instead and you get the readable form back. Several names can go in at once, one per line.

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

Because the browser doesn't trust the name enough to show it in full. Browsers fall back to Punycode when a name mixes scripts or uses characters that could pass for Latin letters. It is a protection against lookalike domains. Paste the name here to see which characters are behind it.

**Are emoji domains valid?**

A few extensions sell them, but IDNA 2008 doesn't allow emoji and most registries refuse them. The converter can still encode one, with a warning. If a message sends you to an emoji domain you didn't expect, treat the link with suspicion.

**Does a Punycode domain work for email?**

Yes for the domain part, since mail servers resolve the A-label. A part before the @ that isn't plain ASCII, such as `jörg@bücher.de`, needs servers that support internationalised email (RFC 6531). That support is far less universal, so test before you rely on it.

**Is the output the same on every site?**

Almost always. Differences appear in edge cases such as ß and ς, where IDNA 2003 mapped them to other characters. This tool follows the current non-transitional rules and shows the older result when it differs. If two sites disagree about a name with those characters, that is usually why.

**Can I register any name that converts cleanly?**

Not necessarily. Each registry publishes the scripts and characters it allows, and many limit a name to one script. This tool checks the general rules, not one registry's list, so a name can convert fine and still be refused at registration. Your registrar gives the final word.
