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.
FAQ
Is AR a standalone tracking code? No. AR (aviso de recebimento) is an add-on to a registered item; the AR itself is not independently traceable. It just signals that a signed receipt should return to the sender.
Can a single tool track every carrier? Not at scale. 17track.net and similar aggregators come closest, but they rely on scraping for several Brazilian last-mile carriers, so reliability varies. For mission-critical tracking, integrate each carrier directly.
Does a JT prefix always mean Sedex 12? Generally yes โ JT and JU map to express Sedex services. The SLA (Sedex 10, 12, hoje) is decided at the contract level and shows up in the tracking events, not the prefix itself.
How do I track international parcels into Brazil? Use the original sender's code on 17track or Correios Rastreio Internacional. Once the parcel enters Brazil, Receita Federal can hold it for formal import processing; the tracking events will reflect "Aguardando pagamento" or "Tributado".
Is the country suffix always BR? Only for items posted from Brazil. A code ending in US, CN or DE still validates under S10, but it identifies the origin postal authority, not Correios.
Related Tools
CPF Validator
Validate Brazilian CPF numbers instantly using the official algorithm. Useful for testing document validation in applications. No data sent to servers.
Batch CPF Validator
Validate a list of CPFs (one per line) and see which are valid and which are not. No data sent to servers.
Batch CNPJ Validator
Validate a list of CNPJs (one per line) with a summary of valid, invalid and total. No data sent to servers.
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.