Tracking number format & check-digit inspector.
Test any barcode against the exact two-pass detect() rules and check-digit validators (ups1Z, s10, dhlExpress, gs1) across all 31 carriers—plus see when to pass ?carrier= for middle-mile consolidators.
Try sample:
1Z999AA10123456784
UPS (ups)- Length & class
- 18 chars · Alphanumeric
- Detection pass
- Pass 1: Strict matches(n) (Order #1 of 31)
- Matched regex
- /^1Z[0-9A-Z]{16}$/
- Check digit
- Valid UPS 1Z Mod-10 (ups1Z)
Synchronous REST lookup
curl "https://api.lastscanned.com/v1/track/1Z999AA10123456784" \
-H "Authorization: Bearer lsk_live_YOUR_API_KEY"Because detect() runs before any network call, mistyped check digits fail fast with 400 unknown_carrier and never consume quota.
Want live scan events for 1Z999AA10123456784? Run free live lookup →
All 31 carrier barcode formats
Evaluated in strict registry order during Pass 1 (matches) and Pass 2 (mayMatch).
| # | Carrier | Slug | Pattern / format | Sample number |
|---|---|---|---|---|
| 1 | UPS | ups | 1Z number, mod 10 check digit: 1Z + 16 letters and digits | 1Z999AA10123456784 |
| 2 | USPS | usps | Domestic barcode: 92–95 + 18–24 digits, optionally led by 420 + ZIP · International (S10): 2 letters + 9 digits + US | 9400111899223197428490 |
| 3 | FedEx | fedex | Express, Ground and SmartPost: 12, 15 or 20 digits, or 96 + 20 digits | 870245193604 |
| 4 | DHL | dhl | Express waybill, mod 7 check digit: 10 digits · Express piece ID: JD or JJD + 10–20 digits · eCommerce: GM + 16–20 digits · Paket SSCC: 0034043 + 13 digits · Deutsche Post international: 2 letters + 9 digits + DE | 1234567891 |
| 5 | Amazon Logistics | amazon | Amazon Logistics / MCF: TBA, TBC or TBM + 12 digits | TBA123456789012 |
| 6 | OnTrac | ontrac | OnTrac: C or D + 14 digits · LaserShip: 1LS + 12–15 letters and digits, or L + letter + 8 digits | C11234567890123 |
| 7 | UniUni | uniuni | UniUni: UUS + 13–16 letters and digits · Partner labels: UR, U9999 or U000 + digits | UUSC000019638703 |
| 8 | GOFO | gofo | GOFO US: GFUS + 14 digits · Older labels: GF + 13 digits | GFUS01074503026309 |
| 9 | Veho | veho | Veho: VH + 12 letters and digits | VH4QX7Z2M9K1PD |
| 10 | Spee-Dee | speedee | Spee-Dee: SP + 16 or 18 digits | SP1234567890123456 |
| 11 | CDL Last Mile | cdl | CDL: CDL + 11 digits · Shipper reference: 9 digits, a dash, 1 digit | CDL12345678901 |
| 12 | Better Trucks | bettertrucks | Shipment: BTS_ + 8–14 letters and digits · Parcel: BTP + 12 letters and digits | BTP123456789012 |
| 13 | AxleHire | axlehire | Jitsu code: 12 or 16 letters and digits, mixed · Shipper number: SCD + 16 letters and digits | 4AUMF4FWVRB5 |
| 14 | Cirro | cirro | Cirro: CR + 12 digits, or CIFR + 13 digits | CR123456789012 |
| 15 | Yanwen | yanwen | Postal (S10): 2 letters + 9 digits + YP · Yanwen: YW + 3 letters + 12 digits | YWUSA123456789012 |
| 16 | 4PX | 4px | 4PX: 4PX + 13 digits + CN | 4PX3001234567890CN |
| 17 | Cainiao | cainiao | Cainiao: LP + 14–17 digits, or AP + 14 digits | LP00123456789012 |
| 18 | YunExpress | yunexpress | YunExpress: YT + 16 digits | YT2412345678901234 |
| 19 | Canada Post | canadapost | Domestic PIN: 16 digits, GS1 check digit · International (S10): 2 letters + 9 digits + CA | 7012345678901230 |
| 20 | Purolator | purolator | PIN: 3 letters + 9 digits · 12-digit PIN: 12 digits; pass ?carrier=purolator, since FedEx owns the shape | PQR482019376 |
| 21 | SpeedX | speedx | SpeedX: SPX + 15 or 21 letters and digits | SPXLAX204518736092 |
| 22 | TForce Final Mile | tforce | TForce: TF + 18 digits · Order piece: 2 letters + 7 digits + hyphen + piece number | TF100000000012345678 |
| 23 | GLS US | glsus | GLS number or shipper reference: 9 digits; pass ?carrier=glsus (not auto-detected) | 512345678 |
| 24 | OSM Worldwide | osm | OSM: OSM + 14 letters and digits · USPS barcode: the 22-digit USPS number, with ?carrier=osm | OSM4F7K2Q9X1B3D5H |
| 25 | Intelcom | intelcom | Intelcom: INTLCM + 1 letter + 9 digits | INTLCMK204815937 |
| 26 | Sendle | sendle | Tracking number: QSS + 9 digits · Order number: QS + 6 digits | QSS000123456 |
| 27 | Pitney Bowes | pitneybowes | eBay International Shipping: UPAA + 1 letter + 15 digits · USPS barcode: the 22-digit USPS number, with ?carrier=pitneybowes | UPAAK000000012345678 |
| 28 | CNE Express | cne | CNE: 3A5V + 9 digits | 3A5V700123456 |
| 29 | SunYou | sunyou | SunYou: SY + 2 letters + 9 digits | SYGB012345678 |
| 30 | UBI Smart Parcel | ubi | UBI: AU + 13 digits | AU0000001234567 |
| 31 | Asendia | asendia | Pirate Ship: AHOY + 8 letters and digits · Other Asendia numbers: the USPS label, AS…US or destination number, with ?carrier=asendia | AHOY7K2M9Q4T |
Format detection FAQ
How auto-detection, check digits, and explicit ?carrier= overrides work in production.
- How does lastscanned identify which carrier owns a tracking number?
- lastscanned runs a deterministic two-pass check across all 31 registered carriers in exact order without making network calls. Pass 1 evaluates strict prefix and check-digit rules (matches(n)); if no carrier matches in Pass 1, Pass 2 evaluates secondary fallback patterns (mayMatch(n)) for UniUni, GOFO, CDL, AxleHire/Jitsu, Purolator, TForce, and OSM Worldwide.
- Which tracking number formats use mathematical check digits?
- Four families validate mathematical check digits before any upstream request: UPS 1Z numbers use an 18-character Mod-10 check digit (ups1Z); 13-character international postal numbers ending in US, DE, YP, or CA use the UPU S10 weighted Mod-11 check digit (s10); 10-digit DHL Express waybills use a Mod-7 remainder check (dhlExpress); and 16-digit numeric Canada Post PINs use a GS1 Mod-10 check digit (gs1).
- Why do 92… and 420+ZIP+92… tracking numbers match USPS but also work with ?carrier=osm or ?carrier=pitneybowes?
- Domestic consolidators like OSM Worldwide and Pitney Bowes print USPS IMpb barcodes (starting with 926129, 927489, or 420+ZIP+92) at the shipper's warehouse. In Pass 1, 92… auto-detects as usps. If USPS still displays 'Currently Awaiting Package', passing ?carrier=osm or ?carrier=pitneybowes queries the middle-mile consolidator's sortation network directly.
- When is ?carrier= required instead of auto-detection?
- Pass ?carrier= when a barcode format collides with a higher-priority carrier or is intentionally excluded from auto-detection: ?carrier=glsus for 8–11 digit GLS US numbers, ?carrier=purolator or ?carrier=canadapost for 12-digit Canadian PINs (which otherwise match FedEx in Pass 1), ?carrier=osm or ?carrier=pitneybowes for pre-USPS middle-mile scans on 92… numbers, and ?carrier=ubi for 33… Australia Post eParcel barcodes.