RFC 3492, one label at a time
Convert a domain to Punycode
DNS labels are ASCII. Punycode stores the other characters in a label that starts with xn--. This page converts each label and leaves an already-ASCII label alone.
A host can mix labels, so www.你好.com becomes www.xn--6qq79v.com. The scheme and any path are stripped before conversion, and a trailing dot is dropped. The algorithm is the Punycode bootstring from RFC 3492. It does not look the name up, and it does not apply extra IDNA mapping rules such as case folding beyond the ASCII labels it lowercases.
The name is converted in this tab. It is not sent to a DNS resolver.
This tool runs in your browser. Turn on JavaScript to use it.
A two-character label
The xn-- prefix is IDNA. The characters after it are the Punycode payload.
- Unicode
- www.你好.com
- ASCII
- www.xn--6qq79v.com
How to use it
- 1Paste a host or a URL.
- 2Convert to ASCII, or decode xn-- labels.
- 3Copy the host. The path is not kept.
Good to know
- Only the host is converted.
- ASCII labels stay as they are, in lower case.
- This does not check whether the domain is registered.
Questions
Why does the result start with xn--?
That prefix marks an ACE label. The rest is Punycode.
Does this resolve the name?
No. It only rewrites the labels.
What about a port or a path?
They are removed. Paste the host if that is all you need.
Related tools
- Split a URL into parts
A URL is several fields joined by punctuation. This page uses the browser's URL parser and lists each part, including every query parameter.
- URL encode and decode
Reserved characters in a URL have jobs. A space, an ampersand, or an equals sign inside a value must be escaped or the query will split in the wrong place.
- Inspect Unicode code points
A character you see may be one code point or several. This page lists the first 80 code points, with U+ notation, decimal, UTF-8 bytes, and a JavaScript escape.