publish unlimited private modules for just $7/month

Base 32 encoding/decoding for JavaScript

Base 32 is between hexadecimal notation and Base 64 encoding. It's intended to be a human-friendly -- you don't have to worry about punctuation, capitalization, or letters/numbers that are easy to confuse, making it easier to transmit in handwriting or over the phone.

One of the primary purposes is to have aesthetically pleasing SHA1 hashes. Compare:

Hex: 17O57684bea1f9331418b633a8f373119d765fd4

B64: xE_ptB5SeclHm8JEsD0-ST1mTBM

B32: 2w2qd15ym7wk650rprtuh4vk26eqcqym

Try giving out the Base 64 hash over the phone! "lowercase 'x', capital 'E', underscore, lowercase 'p', ..." Base 32 will work the same with upper- or lowercase, you can mistake a number for a similar-looking letter, and it will still decode to the same data.