public String getAlpha(int num) { int base = 64; String results = ""; while (num > 0) { int quo = Math.floor(num / base); int rem = num % base; // 'rem' is the # of the character you want. i don't know the best way to do this char chr = ...; results = results + chr; num = quo; } return results; }