Mã hóa

Punycode encode/decode

Mã hóa tên miền chứa ký tự Unicode (IDN) sang định dạng Punycode tương thích ASCII (xn--) và ngược lại.

Câu hỏi thường gặp

What is Punycode used for?

Punycode encodes internationalized domain names containing non-ASCII characters (like münchen.de) into an ASCII-compatible form prefixed with xn--, since the DNS system only supports ASCII labels.

Why should I be careful with Punycode domains?

Punycode enables homograph attacks, where lookalike characters from other alphabets are used to register domains that look identical to a trusted one. If a domain shows an xn-- prefix, decode it here to see what it actually spells out.

Does this only work on full domain names?

You can encode or decode a single label or a full dotted domain — each label between dots is converted independently, with the xn-- prefix only added to labels that actually contain non-ASCII characters.