The recommended way to install BoxPacker is to use Composer. From the command line simply execute the following to add dvdoug/boxpacker to your project’s composer.json file. Composer will automatically take care of downloading the source and configuring an autoloader:

composer require dvdoug/boxpacker

If you don’t want to use Composer, the code is available to download from GitHub


BoxPacker v4 is compatible with PHP 7.3+


Still running an older version of PHP? No problem! BoxPacker v3 is compatible with PHP 7.1 and up.

v3 is still maintained and uses the same core packing algorithm as v4, however lack certain features which are not possible to implement in a backwards-compatible manner.


BoxPacker follows Semantic Versioning. For details about differences between releases please see What’s new