Tracking Code Validator
Validate the format of Brazilian Correios tracking codes (AA123456789BR). Identifies the service prefix and the country.
- Service prefix
- Country
How does the tracking code work?
Correios use the AA123456789BR pattern, 13 characters in all: 2 service-prefix letters (for instance, BR for PAC, JT for Sedex), 9 digits for the label number and 2 closing letters with the country code, usually BR.
What we check here is only the format; there's no status lookup against the Correios API. To actually follow a delivery, head to the official Correios site.
Everything is checked right in your browser.
UPU S10: the universal standard behind postal tracking codes
Every Correios tracking code follows UPU S10, a standard published by the Universal Postal Union (Bern, Switzerland) and adopted by all 192 member countries. The format is strict: LL 9 digits LL — two letters identifying the service class, nine digits (eight serial + one check digit), and two letters for the destination country using ISO 3166-1 alpha-2 (BR for Brazil, US for the United States, DE for Germany).
The point of S10 is interoperability: a single number must work across Correios, USPS, Royal Mail, Deutsche Post and Japan Post systems. Without it, every customs hand-off and last-mile transfer would require manual rekey. S10 also defines barcode symbology (Code 128), the human-readable layout printed on labels and the mandatory check-digit position.
The mod-11 check digit algorithm
The 8th digit of the numeric block is a check digit computed from the previous 7 using a weighted mod-11 scheme. The weights, applied in order, are 8, 6, 4, 2, 3, 5, 9, 7. Procedure:
- Multiply each of the first 7 digits by its corresponding weight.
- Sum the products and compute
sum mod 11. - Subtract from 11. If the result is 10, the check digit is 0; if 11, it is 5; otherwise it is the subtraction itself.
code = "LB 4 7 8 5 8 6 1 _ BR"
digits = [4, 7, 8, 5, 8, 6, 1]
weights= [8, 6, 4, 2, 3, 5, 9]
sum = 32+42+32+10+24+30+9 = 179
179 mod 11 = 3
11 - 3 = 8 -> check digit = 8
Common Correios service prefixes
- LB: international simple letter post.
- PJ: international EMS / Sedex Mundi.
- RA, RB, RL: domestic registered letter.
- JT, JU: domestic Sedex (express).
- AR: aviso de recebimento (return receipt add-on).
- DU: debito automatico (auto-debit notice).
Sedex 12 typically uses the JT prefix while PAC tends to use OE or OY. Knowing the prefix lets a CRM auto-route the parcel to the right SLA bucket without parsing the tracking page.
Real-world use cases
E-commerce platforms (Magazine Luiza, Americanas, Mercado Livre) validate codes the moment a label is printed, before saving them to the customer-facing order page. This prevents a typo from triggering hours of "code not found" support tickets. CRM tools like Octadesk or Zendesk use the same validator at the bot level: if the customer pastes a malformed code, the bot answers immediately instead of opening a ticket.
Aggregator APIs and the post-SRO landscape
The Correios SRO (Sistema de Rastreamento de Objetos) public API was discontinued and replaced by a paid corporate channel that requires a contract. The pragmatic alternatives are:
- 17track.net: multi-carrier aggregator (Correios, Loggi, FedEx, DHL, USPS, China Post). Free tier + paid API.
- BrasilAPI: community endpoint that scrapes the Correios web tracker. Best-effort, not for SLAs.
- Melhor Envio: Brazilian shipping marketplace with a unified tracking webhook.
- Frenet, Kangu: enterprise shipping APIs with carrier-side tracking.
Note that Brazilian last-mile competitors — Loggi, Total Express, Mercado Envios, J&T Express, Jadlog — each use proprietary code formats and are not bound by UPU S10. Validating their codes requires per-carrier regex or BIN-style lookup tables.
Check a Correios tracking code
Before following a parcel, it's worth checking that the tracking code is in the right format. One wrong character is enough for tracking to find nothing. The tool validates the format of Brazilian Correios codes in the pattern of two letters, nine digits and the BR suffix (AA123456789BR).
Beyond verifying the structure, it identifies the prefix, which points to the service type: Sedex, PAC, registered letter, and so on. It serves to check a code before tracking, validate a list of shipments, or simply understand what those two opening letters mean.
Everything runs inside the browser, with nothing sent out. Keep in mind the check is about format, not the real delivery status. To learn the progress, you need to consult Correios tracking.
Frequently asked questions
Is AR a standalone tracking code?
Can a single tool track every carrier?
Does a JT prefix always mean Sedex 12?
How do I track international parcels into Brazil?
Is the country suffix always BR?
Related Tools
Promo Code Validator
Check a promo code against configured format: length, allowed chars (alnum/hyphen) and optional Luhn checksum.
IBGE Municipality Code Validator
Validate IBGE municipality code format (7 digits: UF + 5 inner). Checks if first 2 are a valid UF.
NCM Code Validator
Validate NCM format (8 numeric digits). Decomposes into chapter (2), position (2), subposition (2), item (2). No official table check.
UK Postcode Validator
Validate the format of a UK postcode, such as SW1A 1AA. Useful for forms, e-commerce and sign-ups that serve customers in the United Kingdom.
Germany Postal Validator
Validate the format of a German postal code (PLZ, 5 digits). Useful for forms, e-commerce and international shipping to customers in Germany.
MongoDB ObjectId Validator
Validate that a string is a valid MongoDB ObjectId: 24 hex chars. Shows embedded timestamp (first 4 bytes).