PHPackages                             erajkhatiwada/imb - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. erajkhatiwada/imb

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

erajkhatiwada/imb
=================

A lightweight PHP library for encoding and decoding USPS Intelligent Mail Barcodes (IMB)

v1.0.2(5mo ago)210CC0-1.0PHPPHP ^7.4 || ^8.0

Since Jan 12Pushed 5mo agoCompare

[ Source](https://github.com/erajkhatiwada/imb)[ Packagist](https://packagist.org/packages/erajkhatiwada/imb)[ Docs](https://github.com/erajkhatiwada/imb)[ RSS](/packages/erajkhatiwada-imb/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (3)Versions (6)Used By (0)

IMB - USPS Intelligent Mail Barcode Library for PHP
===================================================

[](#imb---usps-intelligent-mail-barcode-library-for-php)

[![PHP Version](https://camo.githubusercontent.com/39f74b306b25933f9e9dd63e6d2403f80b6496881143a3fcf48583a7e45f854b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545372e34253230253743253743253230253545382e302d626c7565)](https://php.net)[![License](https://camo.githubusercontent.com/1a6df2fb3d801b006731597ce02637cc2812acd848b7300fa479799d4f005fff/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4343302d2d312e302d677265656e)](LICENSE)

A lightweight PHP library for encoding and decoding USPS Intelligent Mail Barcodes (IMB).

> **Note:** This is a PHP port/wrapper of the original Node.js library [BossRoxall/imb](https://github.com/BossRoxall/imb) created by [BossRoxall](https://github.com/BossRoxall). All credit for the original algorithm implementation goes to the original author.

Features
--------

[](#features)

- **Encode** postal information into 65-character IMB barcode strings
- **Decode** IMB barcode strings back to postal data
- **Error correction** for damaged barcodes
- **Full validation** of input data
- **CLI tool** for command-line operations
- **PSR-4 autoloading** compatible
- **PHPStan Level 8** compatible
- **100% test coverage ready**

Installation
------------

[](#installation)

### Via Composer

[](#via-composer)

```
composer require erajkhatiwada/imb
```

### Manual Installation

[](#manual-installation)

1. Clone the repository
2. Run `composer install`

Quick Start
-----------

[](#quick-start)

### Encoding

[](#encoding)

```
