On this page

    M

    punycode.toUnicode

    History
    punycode.toUnicode(domain): void
    Attributes
    domain:string

    The punycode.toUnicode() method converts a string representing a domain name containing Punycode encoded characters into Unicode. Only the Punycode encoded parts of the domain name are converted.

    // decode domain names
    punycode.toUnicode('xn--maana-pta.com'); // 'mañana.com'
    punycode.toUnicode('xn----dqo34k.com');  // '☃-⌘.com'
    punycode.toUnicode('example.com');       // 'example.com'