Skip to main content

PLANET Barcode

Encode and decode USPS PLANET five-bar digit barcodes.

PLANET (Postal Alpha Numeric Encoding Technique) encodes each digit 0-9 as a five-bar pattern of short (i) and tall (I) bars. The full barcode is framed with tall bars at both ends, so a valid sequence has length 5n + 2.

On decrypt, if the ciphertext uses exactly two unique symbols and neither is the canonical i/I (or ./|, 0/1), both orientations are tried and the longer decode wins.