Base32 is a notation for encoding arbitrary byte data. There is no restriction on the maximum length of Base32-encoded data - the "32 characters" refers to the set of characters that are used to write the arbitrary byte data in Base32 notation. The resulting string will only contain characters from that set. The only restriction is that the length of the Base32-encoded string must be a multiple of 40 bits.
The Base32 addresses in I2P are the Base32 encoding of the SHA256 hash of the I2P Destination.
Here is a Python script to convert Base64-encoded I2P Destinations into an I2P B32 address (from the i2p.scripts branch in the I2P Monotone repositories):
#!/usr/bin/env python
#
# Written by duck
# http://forum.i2p/viewtopic.php?t=4367
#
import base64, hashlib, sys
if len(sys.argv) != 2:
print 'Usage: 64to32.py <base64key>'
sys.exit(1)
key = sys.argv[1]
raw_key = base64.b64decode(key, '-~')
hash = hashlib.sha256(raw_key)
base32_hash = base64.b32encode(hash.digest())
print base32_hash.lower().replace('=', '')+'.b32.i2p