Tool to generate/decode PLANET barcodes. PLANET (Postal Numeric Encoding Technique) is a barcode type used in the USA, especially by UPS for mail routing.
Barcode PLANET - dCode
Tag(s) : Character Encoding, Image Processing
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
The PLANET barcode (Postal Alpha-Numeric Encoding Technique) is a numeric postal barcode symbology developed by the United States Postal Service (USPS) for mail tracking. This legacy format is now obsolete and has been replaced by the Intelligent Mail barcode.
The PLANET barcode encodes digits only (0-9). Complete codes generally contain 12 or 14 digits, including a final check digit. The structure depends on the postal service type and includes a service identifier, a subscriber or customer identifier and, depending on the format, additional data.
Each digit is encoded using 5 bits, represented by short (=0) or tall (=1) vertical bars. Each group of 5 bars contains exactly 3 tall bars and 2 short bars. The PLANET encoding table is:
| 0 | 00111 | 1 | 11100 |
|---|---|---|---|
| 2 | 11010 | 3 | 11001 |
| 4 | 10110 | 5 | 10101 |
| 6 | 10011 | 7 | 01110 |
| 8 | 01101 | 9 | 01011 |
The last digit is a check digit calculated using a modulo 10 algorithm.
A complete PLANET barcode begins and ends with a tall framing bar, each corresponding to a bit 1.
Decoding a PLANET barcode consists of reading the vertical bars: short bars correspond to 0 and tall bars to 1. The bars are grouped into blocks of 5 bits, and each block is converted into a digit using the encoding table.
Example: The message 1 11100 11010 11001 1 corresponds to the digits 123, without a check digit.
The PLANET barcode uses a modulo 10 check digit: the sum of all digits in the complete code must be a multiple of 10. The check digit $ X $ is appended to the end of the code.
To calculate it, add the digits of the code excluding the check digit and keep the units digit of the sum, denoted by $ N $. The check digit is then:
$ X = (10 - N) \mod 10 $.
Example: For the number $ 987 $, the sum of the digits is $ 9 + 8 + 7 = 24 $. The units digit is $ N = 4 $. The check digit is therefore $ X = (10 - 4) \mod 10 = 6 $. The complete code is 9876 and its digit sum is $ 9 + 8 + 7 + 6 = 30 $, a multiple of 10.
The PLANET barcode can be recognized by its vertical bars of two heights: short and tall.
The PLANET barcode begins and ends with a tall framing bar.
Each digit is represented by a group of 5 bars consisting of 3 tall bars and 2 short bars.
A PLANET barcode generally contains 12 or 14 digits, including the check digit.
For a code containing $ n $ digits, the total number of bars is $ 5n + 2 $, because each digit is represented by 5 bars and the two framing bars are added at the beginning and end.
PLANET codes were used as part of the USPS CONFIRM service to track mail-processing events.
— Origin Confirm: tracking incoming reply mail, indicating that a reply (for example, a payment, order, or response to a solicitation) has entered the postal system and is on its way to the recipient.
— Destination Confirm: tracking outgoing mail, providing information about its progress through the postal system and helping anticipate its arrival at the destination.
dCode retains ownership of the "Barcode PLANET" source code. Any algorithm for the "Barcode PLANET" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Barcode PLANET" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Barcode PLANET" or any other element are not public (except explicit open source licence). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "Barcode PLANET" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source (Creative Commons CC-BY free distribution license).
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Barcode PLANET on dCode.fr [online website], retrieved on 2026-11-13,