Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

USPS tracking numbers are at least 22 digits long (depending on shipping method; some can be 27); I don’t think ease of data entry was a priority for them.

22 digits and they somehow still manage to reuse tracking numbers. 10^22 (or 10^20, if we assume some encoding overhead) valid numbers should be able to uniquely identify a lot of mail.



A lot of the first digits are actually used for parsing. It's not a fully unique number.

USPS labels (and other labels from other couriers) are an incredibly fascinating subject you would never care about until you work in the industry.


For the ones you mention that have 22 digits, the first 8 digits (if memory serves) identify the class of mail service and other metadata. So that leaves you with 10^14 at most, assuming there’s no encoding overhead / check digits.

> USPS tracking numbers are at least 22 digits long

Actually, that’s wrong. There are shorter ones.

Examples:

82 000 000 00 - Global Express Guaranteed

EC 000 000 000 US - Priority Mail Express International

CP 000 000 000 US - Priority Mail International

There’s also foreign shipped packages that will follow various standards that aren’t 22 digits, yet are still technically a valid USPS tracking number.


They probably encode information in the code itself then, perhaps source/destination or similar. Perhaps to allow "offline" operations?




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: