Decode a BHYT Health Insurance Card Code Online
Decode a Vietnamese health insurance card code (mã thẻ BHYT): beneficiary group, benefit level and %, issuing province and social insurance number.
Result
Press “Run” to see the result.
A Vietnamese health insurance card code has 15 characters, e.g. DN4797931234567: 2 letters for the beneficiary group (DN = employee of a company, HT = pensioner, TE = child under 6, HS / SV = pupil / student…), 1 digit for the benefit level (1–5), 2 digits for the province that issued the card and the 10-digit social insurance number (mã số BHXH). The API splits the code and explains each part in Vietnamese and English.
Group codes and benefit levels follow Appendix I of Official Letter 1804/BHXH-QLT (04/08/2025, after the 2024 amendment of the Health Insurance Law): 65 groups in five categories (paid by employers, by the social insurance fund, by the state budget, partly by the budget, voluntary), plus old codes still printed on cards. Levels are returned with their share of costs (100%, 95%, 80%…) and conditions. A level that differs from the usual one for the group is flagged as a warning, not an error, because a person in several groups gets the best benefit. codes checks up to 500 codes at once and list=true returns the full table.
Only the structure is decoded: the card is not looked up on the VSS portal (validity dates and registered clinic are unknown), and nothing is stored.
Use this in your code
curl "https://apibox.io.vn/v1/bhyt-check?code=DN4797931234567" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch('https://apibox.io.vn/v1/bhyt-check?code=DN4797931234567', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
},
});
const data = await res.json();
console.log(data);import requests
res = requests.get(
"https://apibox.io.vn/v1/bhyt-check?code=DN4797931234567",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/bhyt-check?code=DN4797931234567');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));API documentation → Get a free API key
FAQ
What about the new 10-digit or 12-digit codes?
Electronic cards show the 10-digit social insurance number and, since 08/2025, the 12-digit personal ID can replace it. These are accepted but carry no group or level: use the 15-character code for that.
Does it tell me if the card is still valid?
No, validity dates are not part of the code. Check them on the card, VssID or VNeID.
Why is a level marked as unusual?
Each group has a usual level (DN → 4 = 80%). A different level can be correct when the holder also belongs to a better-covered group, so it is only a warning.