WMW

Punycode Converter

Free

Convert text between Unicode and Punycode (RFC 3492), the ASCII-only encoding used for internationalized domain names, with a full domain mode (dot-aware, xn-- prefix handled automatically) and a plain label mode, batch-converting multiple lines at once.

Runs entirely in your browser. Nothing is uploaded anywhere.

Recent Activity

Visible to everyone. Last 20 uses across all visitors, newest first.

Converted 1 line(s) (domain, to Unicode)

3 hours ago

Converted 1 line(s) (domain, to Punycode)

3 hours ago

Converted 1 line(s) (domain, to Punycode)

3 hours ago

Converted 1 line(s) (domain, to Unicode)

3 hours ago

Converted 1 line(s) (domain, to Unicode)

3 hours ago

Converted 1 line(s) (domain, to Punycode)

3 hours ago

Converted 1 line(s) (plain text label, to Punycode)

3 hours ago

Converted 2 line(s) (plain text label, to Punycode)

3 hours ago

Converted 2 line(s) (domain, to Unicode)

3 hours ago

Converted 2 line(s) (domain, to Punycode)

3 hours ago

Converted 2 line(s) (domain, to Punycode)

3 hours ago

Comments (0)

Found this tool useful? Leave a comment, share a tip, or tell us how we can make it better.

Guest comments are reviewed before publishing. Sign in to post instantly.

No comments yet. Be the first to share your thoughts!

What this tool does

This tool converts text between Unicode and Punycode, the ASCII-only encoding used for internationalized domain names. Paste one or more domains or words, pick a direction, and get an instant, line-by-line conversion, in either full domain mode (dot-aware, with the xn-- prefix handled automatically) or plain label mode for raw encoded or decoded strings.

How It Works

Punycode implements the Bootstring algorithm from RFC 3492: it separates the ASCII characters already in a string from the non-ASCII ones, writes the ASCII part first followed by a hyphen, then encodes the positions and code points of every non-ASCII character as a sequence of generalized variable-length integers using the letters a-z and digits 0-9. In domain mode, each dot-separated label is encoded or decoded independently and the xn-- prefix is added or stripped automatically, matching exactly how a real internationalized domain name is stored in the DNS versus how a browser displays it.

Problems it solves

Frequently asked questions

›What is Punycode actually for?

Domain names can only officially contain ASCII letters, digits, and hyphens, but people need domains in every script and language. Punycode is the encoding (defined in RFC 3492) that represents any Unicode text as an ASCII string prefixed with xn--, so a domain like münchen.de becomes xn--mnchen-3ya.de under the hood while browsers still display the Unicode version to users.

›What is the difference between "Domain name" and "Plain text label" mode?

Domain name mode matches what actually happens on the internet: it splits on dots, leaves plain ASCII labels alone, and adds or removes the xn-- prefix only on labels that need it, so a full hostname like café.example.com converts correctly label by label. Plain text label mode runs the raw Punycode algorithm on the exact string you give it with no dot-splitting and no xn-- prefix, useful if you already have a bare encoded label from another tool or an RFC 3492 test vector.

›Why does converting back to Unicode sometimes fail?

Punycode decoding only succeeds on a well-formed encoded string; a line that is not valid Punycode, or a domain mode line whose label does not actually start with xn--, cannot be decoded and that line is reported as an error while the rest of the input still converts normally.

›Can I convert more than one domain or word at a time?

Yes, put each domain or label on its own line; the output textarea mirrors the input line by line, so line 3 of the output is always the conversion of line 3 of the input.

›Is this the same algorithm real browsers use?

Yes, this tool uses the widely used punycode.js library (the modern successor to the Punycode implementation that shipped in Node.js itself for years), implementing the Bootstring algorithm from RFC 3492 exactly, the same specification every major browser follows when it shows a Unicode domain in the address bar.

Related Tools