Cognex Mobile Barcode Scanner SDK
Postal Code

What is a Postal Code?

A postal code is a grouping of numbers and/or letters featured in a postal address to sort mail according to its destination. Also known as a postcode, post code, Eircode, PIN code, or ZIP code, a postal code can sometimes include spaces or punctuation as well.

Postal code symbology is the conversion of these letters, numbers, spaces, and punctuation into a barcode format using binary coding. The introduction of postal code symbology significantly streamlined mail sorting, resulting in a much more efficient mail delivery system.

Over time, there have been several different postal code barcode systems used. Each new innovation within postal code symbology only further enhances the efficiency of both mail sorting and deliverability.




Postal Code VS ZIP Code

Believe it or not, there is a difference between a mailing postal code and a ZIP code. The ZIP code simply refers to the destination of the mailpiece. However, there are several other factors for a post office to consider before sorting mail.

For example, a post office needs to know the mailpiece class and shape as well as other potential information such as Confirm Subscriber ID. Then, the barcode must account for which options the confirmed subscriber selected. This information could include tracking, the mailing number, mailing campaign details, or even customer identification.

Before the autumn of 2009, the primary postal code symbology used by the USPS at the time was an 11-digit barcode known as POSTNET. That stands for Postal Numeric Encoding Technique, which was an 11-bar barcode.

Back then, there were two barcodes to scan, both POSTNET and PLANET (Postal Alpha Numeric Encoding Technique). PLANET was a postal symbology that was used for mail identification and tracking. The PLANET barcode usually consisted of between 12 to 14 digits.




As you can imagine, scanning two barcodes is more time-consuming for everyone involved from the sorting clerk to the person who delivers the mail. That’s why a new system was developed to become a One-Code Solution.

This new postal code symbology, known as the Intelligent Mail barcode or IM barcode, began rolling out by the end of 2009. By January 28, 2013, the USPS required mailers to use the Intelligent Mail barcode symbology to receive bulk mailing discounts and automation pricing. 

The IM barcode is also known as the 4-State Customer Barcode (4CB, 4-CB, or USPS4CB). It consists of a 65-bar barcode which includes information about the routing ZIP code, package details, and potential tracking information.




Now, both mail sorting clerks and delivery agents only need to scan a single postal code barcode. The Intelligent Mail barcode symbology system is more convenient for everyone involved from the counter to the mailbox.


Postal Code Symbology

To be more specific, an Intelligent Mail barcode can encode up to 31 decimal places using a total of four different vertical bars. An IM barcode uses binary symbology containing important mailpiece data through height-modulated bars. There can be a centered bar, an ascending bar, a descending bar, or a full-length bar.




How To Read A Postal Code

Knowing how to scan a postal code is easy but reading a postal code takes a deeper level of understanding. A total of 65 different combinations of these four different vertical bars contain all the information a post office needs for each mailpiece through the IM barcode. The 31 digits of binary symbology within an Intelligent Mail barcode contain the following information:


First Digit Index Length     Encoded Data
1 2 Barcode Identifier
3 3 Service Type Identifier
6 6 or 9 Mailer ID
12 or 15 9 or 6 Sequence Number
21 11 Destination ZIP Code


The barcode identifier encodes the presorting information for the post office; it consists of two digits. The service type identifier encodes both the mail class as well as any services the sender requests; it consists of three digits.

As for the mailer ID, it encodes information about the specific business sending the mailpiece. A six-digit mailer ID is used for high-volume mailers while the nine-digit mailer ID is reserved for low-volume mailers.

Meanwhile, the sequence number encodes information about the mailpiece recipient. The sender or mailer must ensure this number remains unique for a 45-day period if they are utilizing the Full Service discount. The length of the sequence number is dependent upon the length of the mailer ID.

If the mailer ID is six digits, the sequence number will be nine digits. If the mailer ID is nine digits, then the sequence number will be six digits.

Finally, the destination ZIP code encodes the full five-digit ZIP code, the ZIP + 4 code, and two additional digits containing information about the exact delivery point. This is the information that used to be included within the old POSTNET barcode format.


Who Uses Postal Code Symbology?

Almost any business that manages logistics through shipping or receiving mail and packages uses postal code symbology. The primary business that utilizes postal code symbology in the United States is the USPS. However, postal code symbology is used all over the world in various formats.


How Do We Help Developers Using Postal Code Symbology?

If you need to create or decode postal codes, or even just use postal code encoding/decoding in your next app, the easiest way is by using a postal code scanner. The Cognex Mobile Barcode Scanner SDK supports postal code detection, enabling developers to gather relevant workflow and application data regarding postal code symbology.

Scanning postal codes accurately are important for both developers and postal services alike. Decoding postal codes with precision is equally important, which is why you need the right postal code reader to get your app ready for launch sooner. 

You can download the SDK for free by registering on the Cognex Mobile Barcode Developer Network. In addition, the Barcode Scanner SDK supports a broad range of symbologies to meet your growing development needs.

Get the postal code decoder SDK you can trust as a developer. Check out our convenient mobile barcode scanner and SDK to start saving time so you can get back to developing your next big app idea.

Get Started