Parse and format to arbitrary radix <= Character.MAX_RADIX
public class Main { public static void main(String[] argv) throws Exception { int radix = 32; int i = Integer.parseInt("vv", radix); String s = Integer.toString(i, radix); } }