Skip to content
barcoder

Standards/intelligent-mail-barcode

Intelligent Mail Barcode

Type4-State Postal
PrimaryUS
Completeness85%high

Overview

The Intelligent Mail Barcode (IMb) — also called USPS OneCode, the 4-State Customer Barcode (4CB / USPS4CB), and One Code Solution — is a height-modulated, four-state postal barcode used by the United States Postal Service on letters and flats [1, 3]. It packs the routing (ZIP) data of the legacy postnet barcode and the tracking data of the legacy planet barcode into a single symbol of 65 vertical bars encoding up to 31 decimal digits [1, 4]. The Postal Service required the IMb to qualify for automation prices beginning January 28, 2013, making it the de facto standard for U.S. automation-rate mail [1].

History

  • The IMb was developed by the United States Postal Service to provide greater information and functionality than its predecessors postnet and planet, folding the routing ZIP Code and the tracking information of those two separate symbologies into one barcode [1, 3].
  • The Intelligent Mail Barcode was introduced to replace POSTNET in the fall of 2009 [5].
  • The USPS allowed mailers to continue receiving automation discount rates using POSTNET until January 28, 2013, the date on which the Intelligent Mail Barcode became required for those reduced rates [5, 1]. The same 2013 cutover fully superseded the planet tracking barcode [6].
  • The official Intelligent Mail Barcode (IMb) 4-State Specification continued to be maintained by USPS, with a published revision dated 04/20/2015 [2, 3].

Technical specification

The IMb is a height-modulated, four-state linear postal symbology [1, 2]:

Parameter Value
Symbology family 1D height-modulated, four-state
Bars per symbol 65 fixed
Data capacity 20, 25, 29, or 31 decimal digits
Total bits 130 bits, grouped as ten 13-bit characters
Error handling 11-bit cyclic redundancy check (CRC) — detection only, no correction
Information payload 103 bits (130-bit structure minus 11-bit CRC and framing)
Spec document USPS-B-3200 / IMb 4-State Specification

Four bar states — the term "4-state" comes from each bar being in one of four states [1]. Every bar has a central Tracker portion and may additionally carry an Ascender, a Descender, neither, or both:

State Composition
T — Tracker central portion only (no ascender, no descender)
A — Ascender tracker + upward extension
D — Descender tracker + downward extension
F — Full tracker + ascender + descender (full-height bar)

Nonlinear character coding — the 130 bits are arranged as ten 13-bit characters, where each character has exactly 2, 5, 8, or 11 of its 13 bits set to one, yielding 2,730 valid characters (computed via binomial coefficients) [1, 7]. The minimum Hamming distance between characters is at least 2, allowing single-bit error detection within a character [7].

Error detection — an 11-bit CRC is embedded to detect (but not correct) errors [1, 7]. The Dynamsoft comparison notes that 27 of the 130 bits are devoted to error detection with no correction capability [6].

Data payload structure — up to 31 digits are organized as [1]:

Field Length
Barcode Identifier 2 digits
Service Type Identifier (STID) 3 digits
Mailer ID 6 or 9 digits
Serial / Sequence number 9 or 6 digits (inverse of Mailer ID length)
Routing Code (delivery-point ZIP) 0, 5, 9, or 11 digits

The first 11 digits (Barcode Identifier + STID + Mailer ID prefix) form the Tracking Code; the trailing 0/5/9/11 digits form the Routing Code [1, 6].

Use cases

  • Automation-price letters and flats — the IMb is required for letters and flats prepared for automation prices, covering First-Class Mail postcards, Insured Mail, Certified Mail, and other extra-service mail at automation pricing [3].
  • Mail tracking and visibility — by carrying the Service Type Identifier, Mailer ID, and serial number, the IMb supports USPS mailpiece tracking and Confirm-style visibility services that PLANET previously provided, combined into the same symbol that carries routing data [1, 6].
  • High-speed automated sorting — as a height-modulated barcode it is designed for high-speed automated mail-sorting machines, replacing the routing role of POSTNET [5].

Implementations

  • Czint/zint — 771★, active 2026. General-purpose encoding library supporting over 50 symbologies including USPS OneCode (Intelligent Mail).
  • JavaScriptmetafloor/bwip-js — 2,381★, active 2026. Pure-JavaScript barcode writer (port of Barcode Writer in Pure PostScript) supporting Intelligent Mail among 100+ types.
  • Pythonsamrushing/pyimb — 25★, last commit 2016. Python implementation of the USPS Intelligent Mail Barcode.
  • R (encoder + decoder)mvanhala/uspsimb — 1★, active 2026. USPS Intelligent Mail Barcode encoder/decoder R package.
  • JavaScript decoder — Douglas Boynton Quine publishes a browser-based POSTNET / PLANET / IMb decoder [12].

Comparison

vs. postnet — POSTNET is a two-state (tall/short) height-modulated barcode that encodes only routing data (a 5-digit ZIP, ZIP+4, or 11-digit delivery point code) with a maximum of about 14 numeric digits [6]. The IMb is four-state, fixed at 65 bars, and carries up to 31 digits including both routing and tracking data, with CRC error detection rather than a single modulo-10 check digit [1, 6]. The IMb replaced POSTNET's routing function in 2009 [5].

vs. planet — PLANET was a tracking-only companion to POSTNET (its bar pattern is the inverse of POSTNET), carrying 12–14 digits with a modulo-10 check digit for detection only [6]. The IMb absorbed PLANET's tracking role; PLANET was fully superseded by the IMb on January 28, 2013 [6]. Where mailers once printed two separate barcodes (POSTNET for routing, PLANET for tracking), the IMb carries both data sets in one symbol [3].

When to choose it — for any current U.S. automation-rate mail, the IMb is the only viable choice; POSTNET and PLANET are legacy symbologies that no longer qualify for automation discounts [6].

Fun facts

  • The four-state geometry means each of the 65 bars individually carries information through its shape, not just its presence — the Tracker / Ascender / Descender / Full scheme gives a single linear barcode far more density than the older two-state POSTNET while staying readable by face-cancelling and sorting equipment [1].
  • The IMb deliberately uses a nonlinear coding in which every 13-bit character must have exactly 2, 5, 8, or 11 bits set — out of 8,192 possible 13-bit patterns, only 2,730 are valid characters, which is what gives the symbology its built-in error-detection robustness [1, 7].

Status

Active and required. The IMb is the current USPS four-state standard, required for letters and flats prepared for automation prices [3]. It became mandatory for automation pricing on January 28, 2013, the date that retired the automation-discount eligibility of both POSTNET and PLANET [1, 5, 6]. The official 4-State Specification remains published and maintained on USPS PostalPro [2].

Sources

  1. Intelligent Mail barcode — Wikipedia — Wikipedia, accessed 2026-06-03
  2. Intelligent Mail Barcode (IMb) 4-State Specification — USPS PostalPro — USPS, accessed 2026-06-03
  3. Intelligent Mail Barcode — USPS PostalPro — USPS, accessed 2026-06-03
  4. USPS 4-State Customer Code — Seagull Scientific Barcode Guide — Seagull Scientific, accessed 2026-06-03
  5. POSTNET — Wikipedia — Wikipedia, accessed 2026-06-03
  6. Difference Between Intelligent Mail barcode, Postnet and Planet — Dynamsoft — Dynamsoft, accessed 2026-06-03
  7. Intelligent Mail barcode — HandWiki — HandWiki, accessed 2026-06-03
  8. zint/zint — GitHub — GitHub, accessed 2026-06-03
  9. metafloor/bwip-js — GitHub — GitHub, accessed 2026-06-03
  10. samrushing/pyimb — GitHub — GitHub, accessed 2026-06-03
  11. mvanhala/uspsimb — GitHub — GitHub, accessed 2026-06-03
  12. USPS POSTNET, PLANET, and IMB Barcode Decoder in JavaScript — Douglas Boynton Quine — quine.org, accessed 2026-06-03

Deployments

No country reports mention this standard by name.

source · docs/standards/intelligent-mail-barcode/index.md