Post Code, Thana and District: What a Bangladeshi Code Does Not Tell You
A Bangladeshi address carries an area, a thana and a district, and it is tempting to assume the post code encodes some of that. It does not, in any way you can rely on โ and the software that assumes otherwise fails for the people hardest to reach.

A complete Bangladeshi address carries several layers of place: a village or area, a thana, a district, and a four-digit post code. Written out, the layers look like a hierarchy, and a hierarchy invites the assumption that the smallest piece encodes the larger ones.
It does not. The post code names the post office that delivers to the address, and which thana or district that office happens to sit in is a separate fact that the code does not carry.
Two sets of boundaries, drawn for different reasons
Administrative boundaries โ divisions, districts, upazilas, thanas โ are drawn for governance. Postal boundaries are drawn around delivery: an office serves the area it can reach, and the line runs wherever it stops.
Nobody reconciled the two, and there is no reason they should match. So a post code can cover parts of more than one administrative unit, and an administrative unit can contain several post codes. What the four digits name goes through why a code behaves like an office rather than like a region.
| Part | Drawn by | What it identifies |
|---|---|---|
| Village or area | Local usage | The locality the address sits in |
| Thana | Administration | The administrative unit, used for governance and records |
| District | Administration | The larger administrative unit above it |
| Post code | Bangladesh Post Office | The office that delivers to the address |
Where the assumption does damage
This would be a curiosity if software did not keep encoding the assumption. The common pattern is a form that collects the pieces separately and then fills one in from another: type the post code, and the district appears.
Such a form is right often enough to look correct in testing. It is wrong often enough to produce a steady trickle of addresses with a district that does not match the rest of the line โ and because the value was filled in automatically, the customer often does not notice that it needs correcting.
Worse, the errors are not evenly spread. They concentrate wherever postal and administrative boundaries diverge most, which tends to be at the edges of built-up areas and in places served from a neighbouring unit. Those are the addresses that were already hardest to deliver to, and the autofill makes them harder.
The same trap in reverse
The inference runs the other way too, and it is just as unreliable. A system that picks a post code from a district, so that a record has something in the field, is manufacturing data rather than collecting it.
A district can contain many offices, so choosing one of their codes is choosing arbitrarily. The resulting value passes every format check, survives every export, and points the sorting operation at an office that does not serve the address. It is harder to detect than a missing code precisely because it looks like a complete record.
If the customer did not give you a post code, the field should stay empty. An empty field is a known unknown, and the rest of the address still works.
What a complete address needs
Write all of it out. The area or village, the thana, the district, and the post code. Each piece does something the others cannot: the names tell a person where the address is, and the code tells the sorting operation which office to send it to.
Add a working mobile number. In practice that is what resolves the last step of a delivery in Bangladesh, and it is what a courier falls back on when the written address runs out of detail before the destination does.
If a form only has fields for some of these, put the missing pieces into the street address line rather than dropping them. A second line that reads as a sentence is far more useful to whoever is delivering than a tidy record with the thana missing.
For developers: what to store and what not to infer
Store every component you were given, as text, including the post code. Do not normalise a thana away because you think the district implies it, and do not reconstruct an address line from parts you inferred โ you will lose exactly the detail that made the address deliverable.
For analysis, resist grouping by post code as though it were an administrative unit. A report that counts customers per district by mapping codes to districts is building on a correspondence that does not exist, and the numbers it produces will be wrong in a way that no later check can detect.
If you need an administrative unit, take it from the address the customer gave you, or from an authoritative administrative dataset, and keep it in its own field. Post codes in forms that demand five digits covers the other half of the same discipline: validating the code itself without inventing rules it does not follow.
Why the layers exist at all
It helps to see what each layer was built for. The administrative layers exist so that a government can organise itself: records, services, elections and local administration all need a unit that is defined, stable and documented. The postal layer exists so that an item can be routed to the office that will deliver it.
Those are different problems, and the people solving them were not working from the same map. An administrative boundary moves when a population grows or an authority is reorganised. A postal boundary moves when an office opens, closes or changes the area it covers. There is no mechanism that keeps the two in step, and no reason to expect one.
Seen that way, the mismatch stops being surprising. It is the ordinary result of two systems describing the same ground for different purposes, which is exactly what happens in most countries โ the difference is only in how visible the gap is.
Checking addresses you already hold
If you hold a set of Bangladeshi addresses, there are two checks worth running. First, how many records have a post code that is not four digits. Those are the ones a form has mangled, usually by padding a value to satisfy a five-digit rule.
Second, how many have a district that was filled in automatically rather than typed. If your form ever derived one from a post code, that subset is the one to treat as unverified โ not necessarily wrong, but not evidence of anything either.
Do not try to repair the second group by inferring harder. The information was not captured, and no mapping will recover it. Where the address matters, ask the customer; where it does not, leave the field empty rather than carrying a guess that later work will treat as a fact.
Finding the code for a place you are standing in
The detection tool answers one narrow question: which post code covers the point your device reported. It returns the district alongside the code so you can see whether the answer is plausible, and it never works from a typed address.
Treat the result as a good first answer rather than a final one. Position accuracy degrades indoors and among tall buildings, coverage in the open data behind reverse geocoding is uneven for Bangladesh, and the authority on which office serves a given address is the Bangladesh Post Office post code list.
Detect my post code now Skip the reading โ get the post code for where you are standing.
Detect your post code from your current location
No typing and no address lookup. Your browser asks for permission, your device works out where it is, and the post code in Bangladesh comes back in seconds. Nothing is sent until you press the button.
Your location is only used to find your post code.