Vietnam MST (Tax Code) Validator

Validate Vietnamese tax codes for enterprises and branches

Ad placeholder (leaderboard)

A Vietnamese tax code (Mã số thuế, MST) is the identifier the General Department of Taxation issues to every enterprise and individual taxpayer. Enterprises receive a 10-digit code, and each branch or dependent unit receives a 13-digit code built from the parent’s 10 digits plus a 3-digit branch number. Before relying on an MST on a Vietnamese electronic invoice (hóa đơn điện tử) or supplier record, you can confirm it is well-formed with the official check-digit rule. This free validator runs that exact check in your browser.

How it works

The tenth digit of the 10-digit base is a check digit:

  1. Strip any dashes and spaces.
  2. Multiply the first nine digits by the weights 31, 29, 23, 19, 17, 13, 7, 5, 3.
  3. Add the nine products to get the weighted sum.
  4. Compute 11 - (sum mod 11). If the result is 11 it maps to 0; if the result is 10 the code is invalid because such a check digit is never issued.
  5. The MST is valid when that value equals the tenth digit.

For a 13-digit branch code, the first 10 digits are validated the same way and the final 3 digits are the branch sequence number.

Example

For an enterprise MST, suppose the first nine digits produce a weighted sum of 295. Then 295 mod 11 = 9, so the expected check digit is 11 - 9 = 2. If the tenth digit is 2, the code passes; otherwise it fails.

A valid check digit confirms the MST is well-formed, not that the taxpayer is registered or active. For e-invoice compliance, confirm the status via the official tax portal. Everything here runs locally — your tax code never leaves your device.

Ad placeholder (rectangle)