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 format makes it possible to code only digits characters (0-9), in principle numbers with 12 or 14 digits. It contains 4 parts: the type of mail, a sender code, some tracking / marketing codes, a control character.
Each digit is coded in 5 bits, represented by short (= 0) or long (= 1) bars. The PLANET correspondence 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.
A PLANET barcode completely coded begins and ends with a bit 1 (represented with a long bar), it also includes a check digit before the final 1.
The PLANET code uses a checksum such that the sum of all digits is a multiple of 10. To this end, an additional digit $ X $ completes the barcode.
To calculate it, add all the digits of the barcode and keep the digit of units $ N $. The checksum is $ X = (10 - N) \mod 10 $.
Example: The number 987 has for sum of digits $ 9 + 8 + 7 = 24 $, the unit digit is $ 4 $. The checksum is $ X = 10 - 4 \mod 10 \equiv 6 $.
The PLANET barcode has a graphic form based on long and short vertical bars/lines.
The PLANET barcode begins and ends with a long pipe/bar.
Each character is coded by a group of 5 bits composed of 3 long bars and 2 short bars.
The PLANET barcode has a variable length but most often 12 or 14 characters.
A PLANET barcode has a binary length equal to 2 modulo 5 (its unit digit is 2 or 7) because all the other characters are on 5 bits and 2 bits 1 are added at the beginning and at the end.
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 like Creative Commons). 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.
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 2025-04-16,