Encoders / DecodersLesson 21Free preview
Punycode Converter
This lesson is part of Web Developer Tools · All levels
Summary
Punycode is encoding that converts a domain label containing Unicode characters into an ASCII form, for example münchen.de to xn--mnchen-3ya.de. The xn-- prefix is needed for non-ASCII domain names to be processed by the DNS system that works with ASCII. The browser usually performs this conversion automatically when you type in an international domain. Beware because similar characters from different alphabets can be used for homograph attacks.
Key points
- Changing the Unicode domain name label to ASCII
- The resulting conversion domain is prefixed xn--
- It takes DNS and old systems to process domain names
- Not encryption, just domain name representation
- Similar characters can be misused for homograph attacks
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.