Free USPS Intelligent Mail Barcode Generator (IMb)
The Intelligent Mail barcode (IMb) is the row of 65 short and tall bars on US letters and flats. It holds a 20-digit tracking code and the delivery ZIP Code, and USPS sorting machines read it to route and track each piece. Type the digits and download it, drawn to the sizes in the USPS specification, USPS-B-3200.
Barcode ID 01, service type 234, mailer ID 567094, serial number 987654321, routing code 01234-5678-91.
20 digits of tracking code: barcode ID (2), service type (3), mailer ID and serial number (15). Then the routing ZIP Code, if any: 5, 9 or 11 digits. Spaces and hyphens are ignored.
The blank margin left and right of the bars, in modules (the width of the narrowest bar). USPS Intelligent Mail needs at least 7.
Made in your browser; nothing you type is sent to QRdx. WebP and AVIF are encoded by QRdx's server when you pick them, and nothing is kept.
Where USPS Intelligent Mail barcodes are used
Letters, postcards and flats mailed in the US. Mailers print it in the address block to get automation prices, and with a serial number of its own on each piece, to see where their mail is in the USPS network.
Parcels use a different barcode, the Intelligent Mail package barcode (IMpb).
The scan check on this page can't read Intelligent Mail: the reader it uses doesn't decode it, so the generator says the barcode wasn't checked. Test a printed piece with a reader that supports Intelligent Mail before a mailing.
Where do the numbers come from?
From USPS and from you. USPS assigns the mailer ID (request one in its Business Customer Gateway), the barcode ID, which marks the presort level, and the service type ID, which names the mail class and services such as address correction. Its tables of valid IDs are on PostalPro.
The serial number is yours: give each mailpiece its own, so its scans can be told apart. The routing code is the delivery ZIP Code: 5 digits, ZIP+4 (9) or ZIP+4 and the 2-digit delivery point (11), keeping leading zeros: 02768, not 2768.
What USPS Intelligent Mail can hold
What it takes
20 digits of tracking code: barcode ID (2), service type (3), mailer ID and serial number (15). Then the routing ZIP Code, if any: 5, 9 or 11 digits. Spaces and hyphens are ignored.
Example
0123456709498765432101234567891Type the 20-digit tracking code, then the routing code: 20, 25, 29 or 31 digits in all. Spaces and hyphens are ignored, so you can write it the way it's printed.
The tracking code is the barcode ID (2 digits, the second 0 to 4), the service type ID (3), then the mailer ID and serial number (15). A mailer ID starting with 9 has 9 digits and leaves 6 for the serial; any other has 6 and leaves 9. The line under the field shows how your digits were split.
There's no check digit to type: the barcode carries its own 11-bit error check, worked out from the digits. Tests here draw the four worked examples in USPS-B-3200 and compare all 65 bars of each.
USPS Intelligent Mail barcode size
| Example as SVG, PDF or EPS | 88.4 × 9.6 mm |
|---|---|
| Module (narrowest bar) | 0.508 mm |
| Bar height | 3.96 mm |
| Quiet zone | At least 7 modules each side; the generator starts with 7 |
- The bars follow USPS-B-3200: 0.02 in (0.51 mm) wide, about 22 to the inch, and the full bars 0.156 in (3.96 mm) tall, inside the 0.125 to 0.165 in USPS allows. The bar height has no slider for this reason. Print the SVG, PDF or EPS at 100%.
- USPS asks for 0.125 in (3.2 mm) clear on each side and 0.028 in above and below. The quiet zone starts at 7 bar widths (0.14 in) each side, and the image keeps 0.042 in above and below.
- Image size starts at 2×: at 1× the bars round to whole pixels that are wider than USPS allows.
USPS Intelligent Mail barcode API
The same barcode is an image URL, with no API key: put it in an img tag, a label template or a product feed. It checks the value the way this page does, and allows 300 requests a minute per IP address. The barcode API docs list every option.
SVG image
https://api.qrdx.dev/v1/barcode?format=intelligent-mail&data=0123456709498765432101234567891PNG, 3 pixels per module
https://api.qrdx.dev/v1/barcode?format=intelligent-mail&data=0123456709498765432101234567891&type=png&scale=3In a web page
<img src="https://api.qrdx.dev/v1/barcode?format=intelligent-mail&data=0123456709498765432101234567891" alt="USPS Intelligent Mail 0123456709498765432101234567891" />USPS Intelligent Mail barcode FAQ
Can this page check that it scans?
No. The scan check uses ZXing, which doesn't read Intelligent Mail, so it says the barcode wasn't checked instead of guessing. The encoding is tested against the specification's worked examples, but test a printed piece with a reader that supports Intelligent Mail before a mailing.
Should I print the digits?
Some USPS services require the digits printed with the barcode; most mail doesn't. When they're printed, USPS-B-3200 wants each field separated by a space, in a 10- to 12-point sans serif starting at the first bar, 0.028 to 0.5 in from the bars. The generator prints them that way, 10-point, under the bars; turn them off with the switch under the colors.
Where does it go on the envelope?
Usually in the address block, above the name or below the city line. USPS Publication 25 and the Domestic Mail Manual set the exact areas, and the clear space each side.
Does it replace POSTNET?
Yes. Intelligent Mail carries the ZIP Code the old POSTNET barcode did, plus the tracking code, and USPS no longer gives automation prices for POSTNET.
Other barcode types
All 20 barcode typesBarcodes are static: the data is in the bars, so they work offline and never expire. For a link people scan with a phone camera, use one of the QR code generators.