Skip to main content
The Intelligent Mail barcode (IMb) is the barcode the US Postal Service uses to sort and track letters and flats. It combines what the older POSTNET and PLANET barcodes did, routing and tracking, in one barcode of 65 bars.

Decode one

Scan or paste a barcode and see every part of it.

Make one

Generate a valid barcode from fields.

Where you’ll see it

  • Letters and flats in the US mail, usually above or below the address.
  • Business reply mail, printed on the reply card or envelope.
It has been required for automation prices on letters and flats since January 27, 2013.

Anatomy

Each of the 65 bars is in one of four states: The bars encode up to 31 digits in two parts: The first four parts form the 20-digit tracking code.

No direct mapping from digits to bars

Unlike POSTNET, the bars don’t stand for individual digits. An encoder converts all 31 digits together into the 65 bars, so you can’t read or write an Intelligent Mail barcode by hand. The USPS publishes the encoder, and printing it needs a special font.

Error detection

The encoding includes its own error detection, so the routing code doesn’t need the correction digit that POSTNET used. Scanners verify it and report only the digits.

Gotchas

  • 31 digits, or fewer. The routing code can be empty, 5, 9 or 11 digits, so a valid scan can be 20, 25, 29 or 31 digits long.
  • The serial number isn’t unique forever. Mailers can reuse serial numbers after a period the USPS defines. Pair it with the mailing date if you store it.

Scanning it in your app

Specification