RFC 3548 and 4648 compliant base 32 encoder/decoder

v1.2.0 2018-12-07 10:52 UTC

This package is not auto-updated.

Last update: 2020-08-02 11:05:51 UTC


RFC 3548 and 4648 compliant base 32 encoder/decoder.


Open a command console, enter your project directory and execute the following command to download the latest stable version of this library:

$ composer require sendinblue/base-32 "~1"

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.


This library provides a \SendinBlue\Base32 class which exposes a encode and decode method, that’s it!

You can also set encode’s second argument $padding to false to avoid including any padding into the encoded string.


use SendinBlue\Base32;

    Base32::encode('foobar'),           // MZXW6YTBOI======
    Base32::encode('foobar', false),    // MZXW6YTBOI
    Base32::decode('MZXW6YTBOI======'), // foobar
    Base32::decode('MZXW6YTBOI')        // foobar


This library has been profiled with blackfire against

  • christian-riesen/base32
  • paragonie/constant_time_encoding
  • skleeschulte/base32
  • togos/base32
  • chillerlan/php-base32

and it outperformed them all both on time and memory.