This library implements Base32 encoding. In addition to integers it can encode and decode any arbitrary data. Install Install with composer. $ composer require tuupola/base32 Usage This package has both pure PHP and GMP based encoders. By default encoder and decoder will use GMP functions if the extension is installed. If GMP is not available pure PHP encoder will be used instead. $base32 =newTuupola\Base32; $encoded = $base32->encode(random_bytes(128)); $decoded = $base32->decode($encoded); ...