CCCD QR code reader API

Parse the QR code of a Vietnamese chip ID card (CCCD / căn cước) from its text or a photo: ID number, name, birth date, sex, address, issue date, checks.

POSThttps://apibox.io.vn/v1/cccd-qr

The QR code printed on Vietnamese chip ID cards (CCCD gắn chip since 2021, thẻ căn cước since 07/2024) holds one line of text separated by |: the 12-digit personal ID number, the old 9-digit CMND number (may be empty), full name, date of birth (ddmmyyyy), sex, place of residence and issue date. Send that text as qr, or a photo of the code as image (PNG / JPEG, the QR is read on the server), and get clean JSON with ISO dates.

The 12-digit number is checked against the card itself: province of registration (with the province it belongs to since the 2025 merger), the sex / century digit and the two birth-year digits must agree with the printed date of birth and sex. The name is split into family, middle and given names, the address is matched to the current wards and provinces, and the validity is computed from the renewal ages 14, 25, 40 and 60 of the Law on Identification 2023 (a card issued within 2 years before one of these ages stays valid until the next one).

This reads what the QR says; it does not prove the card is genuine (use the NFC chip for eKYC). The data is personal: it is processed in memory only, never stored and never logged.

Parameters

NameInTypeRequiredDefault
qrbodystringnoThe QR text (ID|old ID|name|ddmmyyyy|sex|address|ddmmyyyy).
imagebodyfilenoOr a PNG / JPEG photo of the QR code (multipart or image_base64).
addressbodybooleannotruefalse: do not match the address to current wards.

Example

curl -X POST "https://apibox.io.vn/v1/cccd-qr" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"qr":"079099012345|272345678|Nguyễn Văn An|15081999|Nam|123 Lê Lợi, Phường Bến Thành, Quận 1, TP. Hồ Chí Minh|20042021"}'

Response

{
  "source": "text",
  "valid": true,
  "errors": [],
  "warnings": [],
  "id_number": "079099012345",
  "old_id_number": "272345678",
  "full_name": "Nguyễn Văn An",
  "date_of_birth": "1999-08-15",
  "sex": "male",
  "address": "123 Lê Lợi, Phường Bến Thành, Quận 1, TP. Hồ Chí Minh",
  "issue_date": "2021-04-20",
  "name_parts": {
    "family_name": "Nguyễn",
    "middle_name": "Văn",
    "given_name": "An",
    "unaccented": "NGUYEN VAN AN"
  },
  "number_details": {
    "province_code": "079",
    "province": "TP. Hồ Chí Minh",
    "province_since_2025": "TP. Hồ Chí Minh",
    "sex": "male",
    "century_digit": 0,
    "birth_year": 1999,
    "serial": "012345"
  },
  "validity": {
    "valid_until": "2024-08-15",
    "lifetime": false,
    "expired": true,
    "rule": "Renew at 14, 25, 40 and 60; a card issued within 2 years before one of these ages stays valid until the next one (Luật Căn cước 2023, Điều 21)."
  },
  "address_parsed": {
    "format": "old (before 07/2025)",
    "matched": true,
    "result": {
      "ward": "Phường Bến Thành",
      "ward_code": "26743",
      "province": "Thành phố Hồ Chí Minh",
      "province_code": "79",
      "postal_code": "71009",
      "full_address": "123 Lê Lợi, Phường Bến Thành, Thành phố Hồ Chí Minh"
    }
  },
  "note": "Parsed from the QR text only: this does not prove the card is genuine (use NFC chip reading / C06 verification for eKYC). Nothing is stored or logged."
}

Use cases

  • Fill in hotel or rental guest registration from the ID card
  • Speed up customer onboarding forms (banks, SIM, clinics)
  • Check that typed ID data matches the card
  • Detect expired ID cards at check-in

FAQ

Is the card verified with the police database?

No. Only the QR content and the structure of the number are checked; genuine verification needs the NFC chip or the C06 service.

Which cards are supported?

Chip CCCD cards (2021) and the new identity cards (căn cước, 2024). Old barcoded CCCD and 9-digit CMND cards have no such QR code.

Is my data stored?

No. Requests are processed in memory, nothing is written to logs, caches or databases.

Related APIs

Start with 1,000 free requests every month. Get free API key →