Punycode encoder / decoder.
The functions are simple transcriptions into Java of the algorithms in the Punycode specification.
To convert a string (e.g. an international domain name) into Punycode:
String encoded = Punycode.encode(domainName);And to decode a Punycode string into Unicode:
String decoded = Punycode.decode(encodedName);Unicode surrogate sequences will be accepted in the input string for encoding, and will be produced if required when decoding.
The latest version of the library is 1.0, and it may be obtained from the Maven Central repository.
<dependency>
<groupId>io.jstuff</groupId>
<artifactId>punycode</artifactId>
<version>1.0</version>
</dependency> implementation 'io.jstuff:punycode:1.0' implementation("io.jstuff:punycode:1.0")Peter Wall
2025-11-13