USPS Barcode Generator: Intelligent Mail Barcode (IMb)

Make a USPS Intelligent Mail barcode (IMb) online for free. Enter the Barcode Identifier, Service Type Identifier, Mailer ID, serial number and ZIP Code, and the generator checks each field, draws the 65 bars at USPS dimensions and adds the human-readable line. Download SVG, PNG, PDF or EPS, or decode bar letters.

Valid

3.179 × 0.368 in at 300 DPI

Tracking code · 20 digits

Assigned by USPS, mainly for the presort level; 2 digits, the second 0 to 4.

From the USPS table of Service Type Identifiers (mail class and services).

Assigned by USPS: 6 digits (000000–899999) or 9 digits starting with 9.

9 digits with a 6-digit Mailer ID, 6 with a 9-digit one.

Routing code · delivery point ZIP Code

Leave all three empty for no routing code. Keep leading zeros: 02768, not 2768.

Human-readable text

The tracking and routing digits in 10-point sans-serif, 0.028 in from the bars. Required only for some services; USPS publications for your service say whether.

Size and resolution

Output DPI

300 DPI · Thermal / offset

USPS fixes the size: 22 bars per inch, bars 0.020 in wide, full bars 0.145 in tall. The barcode is never scaled; the DPI sets the pixels of PNG, WebP and JPEG files only.

Decode bar lettersF A D T

Paste the 65 bar letters, as encoder software or the USPS encoder prints them; a barcode read upside down is turned around.

USPS IMb · Live previewValid
Intelligent Mail barcode for 01 234 567094 987654321 01234 5678 91

Scaled to fit. Actual size shows the print size on screen.

Type
USPS IMb · 4-state
Print size
3.179 × 0.368 in
Raster
954 × 110 px
Bars
65 · 22 per inch
Tracking code
01234567094987654321
Routing code
01234567891
CRC
751
Read back
Checking…

Bars as letters · F full, A ascender, D descender, T tracker

AADTFFDFTDADTAADAATFDTDDAAADDTDTTDAFADADDDTFFFDDTTTADFAAADFTDAADA

80.7 × 9.3 mm with the clear zone; bars 2.929 in long. Human-readable line: 01 234 567094 987654321 01234 5678 91

Download

Vector drawing, 3.179 × 0.368 in (80.7 × 9.3 mm). Design and label programs place it at its print size.

Print at 100%, without fit-to-page scaling. Everything runs in your browser.

How to Generate an Intelligent Mail Barcode

Fill in the tracking code fields and the ZIP Code, check that the badge says Valid, and download the barcode.

  1. Enter the Barcode Identifier and Service Type Identifier for your mailing, from the USPS tables on PostalPro.
  2. Enter your Mailer ID and a serial number that is unique for each mailpiece.
  3. Add the ZIP Code, the +4 and the delivery point, or leave them empty for no routing code.
  4. Choose where the human-readable line goes and the DPI for image files, then download SVG, PNG, WebP, JPEG, PDF or EPS.

Intelligent Mail Barcode Fields

An IMb holds a 20-digit tracking code and a routing code of 0, 5, 9 or 11 digits, up to 31 digits in all (USPS-B-3200 §2.1.3).

Tracking Code

  • Barcode Identifier: 2 digits assigned by USPS, mainly for the presort level; the second digit is 0 to 4.
  • Service Type Identifier: 3 digits for the mail class and services, such as full-service or basic and the address correction you want.
  • Mailer ID: 6 digits from 000000 to 899999, or 9 digits from 900000000 to 999999999.
  • Serial number: 9 digits with a 6-digit Mailer ID, 6 digits with a 9-digit one, so the tracking code is always 20 digits.

Routing Code

The routing code is the delivery point ZIP Code: nothing, a 5-digit ZIP Code, ZIP+4 (9 digits), or ZIP+4 with the 2-digit delivery point (11 digits). Leading zeros stay, so ZIP Code 02768 is entered as 02768, and a missing delivery point is left out rather than filled with zeros.

Where the Mailer ID Comes From

USPS assigns Mailer IDs, generally through the Mailer ID system in its Business Customer Gateway. This generator only encodes the number you enter: it cannot issue a Mailer ID, register a mailing or pay postage.

What Is an Intelligent Mail Barcode?

The Intelligent Mail barcode is the USPS barcode for letters and flats: 65 bars of four kinds that carry up to 31 digits of routing and tracking data.

The Four Bar States

  • Full (F): reaches both above and below the middle band.
  • Ascender (A): the middle band and the part above it.
  • Descender (D): the middle band and the part below it.
  • Tracker (T): only the short middle band.

IMb vs POSTNET and PLANET

USPS-B-3200 calls POSTNET and PLANET legacy barcodes that the IMb has replaced. POSTNET carried the ZIP Code in full and half bars, and the 12-digit PLANET Code tracked mail; the IMb holds both kinds of data in one barcode. The specification also names the IMb the USPS OneCode Solution and the 4-State Customer Barcode.

How the IMb Is Encoded

The 20 to 31 digits become one large binary number, which gets an 11-bit check (CRC) and is split into 65 bars in six steps set by USPS-B-3200 §2.2.

  1. The routing code and tracking code are combined into one binary number of up to 102 bits.
  2. An 11-bit CRC (frame check sequence) is calculated over that number.
  3. The number is divided into 10 codewords.
  4. One CRC bit and the bar orientation are added to the first and last codewords.
  5. Each codeword becomes a 13-bit character from the USPS tables, inverted where the other CRC bits say so.

The 130 bits of the 10 characters are then spread over the 65 bars, two per bar: one for the ascender and one for the descender. This generator reproduces the four worked examples in Appendix C of the specification bar for bar, and the test suite checks them on every build.

USPS Barcode Requirements for Size and Print

USPS-B-3200 fixes the IMb size within narrow ranges, so the generator draws it at set dimensions instead of letting you scale it.

Intelligent Mail barcode dimensions
MeasureUSPS rangeThis generator
Bars per inch20 to 2422
Bar width0.015 to 0.025 in0.020 in
Full bar height0.125 to 0.165 in0.145 in
Length of the 65 barsAt least 2.667 in between the lead edges of the first and last bar, at most 3.225 in overall2.909 in and 2.929 in
Clear zoneAt least 0.125 in at each end, 0.028 in above and below0.125 in and 0.028 in

Human-Readable Line

Some services require the digits to be printed with the barcode, as the USPS publications for those services state. The line goes above or below the bars, 0.028 to 0.5 inch from them, starts at the first bar, and uses a sans-serif font of 10 to 12 points, such as 01 234 567094 987654321 01234 5678 91.

Printing the Barcode

Print the SVG or PDF at 100% or a PNG at its DPI, without fit-to-page scaling, which would change the bar pitch. The background must be plain, and the bars must differ from it by a print reflectance difference of at least 30%. On letters, the barcode may tilt by at most 5 degrees. Before you download, the generator measures the 65 bars of its own drawing at the chosen DPI and decodes them with the CRC, and a mismatch shows as a warning on the badge.

Decode an Intelligent Mail Barcode

Open Decode bar letters under the fields, paste the 65 bar letters (F, A, D and T), and the decoder returns the tracking code fields and the ZIP Code.

The decoder checks the CRC, so a wrong bar is reported instead of decoded to other digits, and it turns a barcode read upside down the right way. Load into the fields copies the result into the generator, where you can change it and download it again.

It reads bar letters, not photos: the Barcode.codes scanner does not read 4-state postal barcodes. Write the bars down from left to right, F for full, A for ascender, D for descender and T for tracker.

Frequently Asked Questions

Do I Need a Mailer ID for an Intelligent Mail Barcode?

Yes, for barcodes you print yourself, except with Origin IMb Tracing, where the Mailer ID and serial fields form one 15-digit customer number. USPS assigns Mailer IDs, generally through its Business Customer Gateway; this generator does not issue them.

Which Service Type Identifier Should I Use?

It depends on the mail class, the service option and the address correction you want. USPS assigns the values and publishes them in the Table of Service Type Identifiers on PostalPro, its website for mailers.

Can I Track Mail With an Intelligent Mail Barcode?

USPS offers IMb Tracing, a service with tracking information for automation letters and flats that carry a unique IMb. The tracking data comes from USPS; Barcode.codes only draws the barcode and sees no scans of your mail.

Do I Need an Intelligent Mail Barcode Font?

Not with this generator. The USPS encoder turns the digits into 65 letters that a special font then prints as bars; this generator draws the bars itself as SVG, PNG or PDF, so nothing needs to be installed.

Why Can't I Change the Barcode Size?

USPS sets the bar pitch, width and height within narrow ranges, so a stretched or shrunk barcode can fall outside them. The generator uses values near the middle of each range, and the downloads keep that size when printed at 100%.

Can I Scan an Intelligent Mail Barcode With My Phone?

Not with the Barcode.codes scanner, which reads 1D and 2D barcodes but not 4-state postal codes. If you know the bars, type them as letters into the decoder on this page to see the tracking code and ZIP Code.