arbitrary base conversion in javascript

valuebase / alphabetclick!

some base alphabets of interest
base 4
base 36 (alphanumeric without case)
base 62 (alphanumeric with case)
base 77 (url-safe, i think)

i was a bit surprised to completely fail in finding an online arbitrary base converter which didn't need a download, so wrote this real quick-like.
enter a value and the alphabet in the top two boxes, enter the destination alphabet in the bottom-right box, and click the "v" button.
to go the other way, click the "^" button.
note that the stock decimal alphabet is "0123456789", but you could do something crazy like "987654310" if you want.
this would make a handy decoder ring type thing, if only the number values could be arbitrarily large too..

orion elenzil 20080905