Vietnamese Tax Code MST (Headquarters) Validator
Validate the authenticity, format, and checksum of Vietnamese Tax Code MST (Headquarters).
About Vietnamese Tax Code MST (Headquarters) Validation
The Mã Số Thuế (MST) is the enterprise tax identification number issued by the General Department of Taxation of Vietnam (GDT) under Circular 105/2020/TT-BTC to identify corporations and headquarter entities.
The headquarter MST consists of 10 digits. The first 2 denote the registration province; digits 3-9 are sequential; and the 10th digit is the check digit computed via weights `31, 29, 23, 19, 17, 13, 7, 5, 3`, modulo 11, subtracted from 10.
Anatomy & Structure of MST (Tax Identification Number) — Vietnam
The Vietnamese Tax ID consists of 10 digits structured in 3 parts:
| Position | Field | Length | Meaning & Rule | Example |
|---|---|---|---|---|
| 1 & 2 | Tax Province Code | 2 digits | Issuing tax office province code (01 to 99) | 01 |
| 3 to 9 | Sequential Base Number | 7 digits | Unique sequential number assigned by General Department of Taxation (GDT) | 0123456 |
| 10 | Check Digit | 1 digit | Calculated via weighted Modulo 11 with weights [31, 29, 23, 19, 17, 13, 7, 5, 3] | 7 |
Official Algorithm (Weighted Modulo 11 — General Department of Taxation)
Official check digit calculation for Vietnamese MST:
S = Σ d[i] * W[i] (i=0..8); R = S mod 11; D = 10 - R; DV = (D === 10 || D === 11) ? 0 : D
- 1. Multiply the first 9 digits by weights: W = [31, 29, 23, 19, 17, 13, 7, 5, 3].
- 2. Sum all weighted products into total S.
- 3. Compute remainder R of S divided by 11.
- 4. Calculate difference D = 10 - R.
- 5. If D is 10 or 11, check digit is 0; otherwise DV = D.