How this tool computes its result
Converts domain names between Unicode (international characters) and ASCII Punycode (xn-- prefix) using the punycode library. Converts domain by lowercasing and splitting on ".", then for each label: if it already starts with "xn--," it is passed to punycode.toUnicode(); otherwise it is passed to punycode.toASCII(). The reverse direction applies the opposite logic. Error handling catches any exception and returns a user-facing error message.
