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).

Full regex specification →
#CarrierSlugPattern / formatSample number
1UPSups1Z number, mod 10 check digit: 1Z + 16 letters and digits1Z999AA10123456784
2USPSuspsDomestic barcode: 92–95 + 18–24 digits, optionally led by 420 + ZIP · International (S10): 2 letters + 9 digits + US9400111899223197428490
3FedExfedexExpress, Ground and SmartPost: 12, 15 or 20 digits, or 96 + 20 digits870245193604
4DHLdhlExpress 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 + DE1234567891
5Amazon LogisticsamazonAmazon Logistics / MCF: TBA, TBC or TBM + 12 digitsTBA123456789012
6OnTracontracOnTrac: C or D + 14 digits · LaserShip: 1LS + 12–15 letters and digits, or L + letter + 8 digitsC11234567890123
7UniUniuniuniUniUni: UUS + 13–16 letters and digits · Partner labels: UR, U9999 or U000 + digitsUUSC000019638703
8GOFOgofoGOFO US: GFUS + 14 digits · Older labels: GF + 13 digitsGFUS01074503026309
9VehovehoVeho: VH + 12 letters and digitsVH4QX7Z2M9K1PD
10Spee-DeespeedeeSpee-Dee: SP + 16 or 18 digitsSP1234567890123456
11CDL Last MilecdlCDL: CDL + 11 digits · Shipper reference: 9 digits, a dash, 1 digitCDL12345678901
12Better TrucksbettertrucksShipment: BTS_ + 8–14 letters and digits · Parcel: BTP + 12 letters and digitsBTP123456789012
13AxleHireaxlehireJitsu code: 12 or 16 letters and digits, mixed · Shipper number: SCD + 16 letters and digits4AUMF4FWVRB5
14CirrocirroCirro: CR + 12 digits, or CIFR + 13 digitsCR123456789012
15YanwenyanwenPostal (S10): 2 letters + 9 digits + YP · Yanwen: YW + 3 letters + 12 digitsYWUSA123456789012
164PX4px4PX: 4PX + 13 digits + CN4PX3001234567890CN
17CainiaocainiaoCainiao: LP + 14–17 digits, or AP + 14 digitsLP00123456789012
18YunExpressyunexpressYunExpress: YT + 16 digitsYT2412345678901234
19Canada PostcanadapostDomestic PIN: 16 digits, GS1 check digit · International (S10): 2 letters + 9 digits + CA7012345678901230
20PurolatorpurolatorPIN: 3 letters + 9 digits · 12-digit PIN: 12 digits; pass ?carrier=purolator, since FedEx owns the shapePQR482019376
21SpeedXspeedxSpeedX: SPX + 15 or 21 letters and digitsSPXLAX204518736092
22TForce Final MiletforceTForce: TF + 18 digits · Order piece: 2 letters + 7 digits + hyphen + piece numberTF100000000012345678
23GLS USglsusGLS number or shipper reference: 9 digits; pass ?carrier=glsus (not auto-detected)512345678
24OSM WorldwideosmOSM: OSM + 14 letters and digits · USPS barcode: the 22-digit USPS number, with ?carrier=osmOSM4F7K2Q9X1B3D5H
25IntelcomintelcomIntelcom: INTLCM + 1 letter + 9 digitsINTLCMK204815937
26SendlesendleTracking number: QSS + 9 digits · Order number: QS + 6 digitsQSS000123456
27Pitney BowespitneyboweseBay International Shipping: UPAA + 1 letter + 15 digits · USPS barcode: the 22-digit USPS number, with ?carrier=pitneybowesUPAAK000000012345678
28CNE ExpresscneCNE: 3A5V + 9 digits3A5V700123456
29SunYousunyouSunYou: SY + 2 letters + 9 digitsSYGB012345678
30UBI Smart ParcelubiUBI: AU + 13 digitsAU0000001234567
31AsendiaasendiaPirate Ship: AHOY + 8 letters and digits · Other Asendia numbers: the USPS label, AS…US or destination number, with ?carrier=asendiaAHOY7K2M9Q4T

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.

Live tracking pages by carrier