devpocket.dev

Punycode / IDN Converter

Convert Unicode domains and xn-- labels, process batches, or encode and decode raw Punycode strings.

Runs locally
Loading tool…

How to use

  1. Choose Domain or Batch and enter hostnames without a scheme, port or path. Batch accepts one domain per line; blank lines are skipped.
  2. Auto decodes a domain if any label begins with xn--; otherwise it encodes. Select Encode or Decode to override this choice.
  3. Copy individual results or all successful batch results. Review length and mixed-script warnings before using a domain.
  4. Choose Raw string for prefix-free RFC 3492 conversion. Raw mode preserves case and normalization, so select its direction explicitly. Domain mode lowercases and applies NFC.

FAQ

What is an internationalized domain name (IDN)?

An IDN contains Unicode characters, such as münchen.de or 中文.com. Punycode represents non-ASCII labels using ASCII; domain labels add the xn-- prefix. This converter works label by label, whereas URL Parser handles complete URLs and their components.

Can I use this as an xn-- decoder or for raw Punycode?

Yes. Domain auto mode detects xn-- labels and decodes them. Raw mode operates on one whole string without the prefix, preserving case and Unicode normalization. Raw ASCII-only input encodes with a final hyphen, so automatic direction detection would be ambiguous.

Does successful Punycode conversion validate a domain?

No. This is not full IDNA2008 or UTS46 validation. It warns above 63 ASCII characters per label or 253 per domain, excluding the trailing root dot. Common-script mixing is a homograph heuristic, not a complete confusables check. It neither checks registration nor establishes trust.

Are there input limits, and are domains saved?

A domain or raw decoded text is limited to 1,024 UTF-16 units; raw encoded input allows 8,192. Batch mode accepts 100 non-empty lines and 16,384 units total. These processing limits keep local conversion responsive. Only options are persisted; input and output remain in memory and are never uploaded.

Related tools