Search for a tool
Punycode

Tool to convert domain names to Punycode and vice versa, simplifying the management of special characters for universal compatibility.

Results

Punycode -

Tag(s) : Character Encoding

Share
Share
dCode and more

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!


Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!


Feedback and suggestions are welcome so that dCode offers the best 'Punycode' tool for free! Thank you!

Punycode

Punycode Decoder

 



See also: URL Decoder

Punycode Encoder

 



See also: URL Decoder

Answers to Questions (FAQ)

What is Punycode? (Definition)

Punycode is an encoding system that allows non-ASCII characters (such as accents, Cyrillic, Chinese, Arabic, etc.) to be represented using only 37 ASCII characters. Its main use is in Internationalized Domain Names (IDNs).

Why was Punycode created?

Punycode was developed to solve a major problem: traditional domain names only support 37 ASCII characters (26 letters from a to z, 10 numbers from 0 to 9 and the hyphen -).

With the global expansion of the Internet, it became necessary to allow the use of characters from foreign alphabets in domain names.

Punycode converts any Unicode character into an ASCII sequence, making international domain names compatible with existing infrastructure.

How does Punycode work?

Punycode works in two main steps:

Character separation: The domain name is divided into two parts: ASCII characters (which remain unchanged) and non-ASCII characters.

— Non-ASCII character encoding: Non-ASCII characters are converted into a sequence of ASCII characters using a specific algorithm (called Bootstring). This sequence is then added to the end of the domain name, preceded by the prefix xn--.

Example: météo.fr is converted into xn--mto-bmab.fr via Punycode

What is the Punycode/Bootstring algorithm?

Punycode is based on the Bootstring algorithm, a general encoding algorithm for Unicode strings. The encoding process (Unicode to Punycode) is as follows:

— The Unicode string is scanned, the ASCII characters (from codes 0 to 127) are copied directly.

— Non-ASCII characters are extracted, deduplicated, and sorted in ascending Unicode code point order.

— Each non-ASCII character is encoded by a number defining both the character to be inserted and its location in the string. The number is then encoded in a system close to (but not identical to) base 36 with letters and numbers.

— The resulting sequence of letters and numbers is added to the end of the Punycode string under construction, separated from the previous characters by a hyphen -.

How to recognize an address in Punycode? (Identification)

Punycode addresses always start with the prefix xn-- followed by a series of letters and numbers.

Punycode is currently the standard method for encoding international domain names.

RFC 3492 describes in detail how Punycode encoding works.

The length of the encoding can be significantly longer than the original text.

What are the risks raised by the Punycode?

Punycode is generally safe, but it can be used to create domain names that look like other domain names (homoglyph or phishing attacks).

Example: The Cyrillic letter а looks like the Latin letter a.

Modern browsers try to detect and warn users of these potential risks.

Source code

dCode retains ownership of the "Punycode" source code. Any algorithm for the "Punycode" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Punycode" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Punycode" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.

Cite dCode

The content of the page "Punycode" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source. Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link: https://www.dcode.fr/punycode-encoding
In a scientific article or book, the recommended bibliographic citation is: Punycode on dCode.fr [online website], retrieved on 2025-04-16, https://www.dcode.fr/punycode-encoding

Need Help ?

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!

Questions / Comments

Feedback and suggestions are welcome so that dCode offers the best 'Punycode' tool for free! Thank you!


https://www.dcode.fr/punycode-encoding
© 2025 dCode — The ultimate collection of tools for games, math, and puzzles.
 
Feedback