Home / Guides / Guides
Guides

Indian ID Number Formats, Explained

What every character in a PAN, GSTIN, CIN, IFSC or Udyam number means — plus validation regexes and safe test values for developers.

BILAPI14 Nov 20267 min read

Indian ID numbers are not random strings — almost every one encodes information you can read straight off it: the state, the type of holder, the year of incorporation. Knowing the structure lets you validate input before you spend an API call, catch typos at the form, and understand what a number tells you at a glance.

A number that matches the format is not proof the number exists. Format checks catch typos; a verification API confirms the number is real and belongs to the right person or business.

PAN — 10 characters

Format: five letters, four digits, one letter — for example ABCPS1234K.

  • Characters 1–3: an alphabetic series (AAA to ZZZ).
  • Character 4: the holder type — P person, C company, H HUF, F firm, A association of persons, T trust, B body of individuals, L local authority, J artificial juridical person, G government.
  • Character 5: the first letter of the holder's surname (for a person) or of the entity's name.
  • Characters 6–9: a running number from 0001 to 9999.
  • Character 10: an alphabetic check character.
Regex:  ^[A-Z]{3}[ABCFGHJLPT][A-Z][0-9]{4}[A-Z]$

About the popular test value ABCDE1234F: it passes a loose five-letters-four-digits-one-letter check, but its 4th character "D" is not a valid holder type, so it can never be a real PAN. That makes it fine as a placeholder in documentation — but test against a sandbox, never with someone else's real PAN.

GSTIN — 15 characters

  • Characters 1–2: the state code (27 Maharashtra, 29 Karnataka, 07 Delhi, 33 Tamil Nadu…).
  • Characters 3–12: the PAN of the business.
  • Character 13: the registration number for that PAN within the state (1–9, then A–Z).
  • Character 14: "Z" by default.
  • Character 15: a check character.
Example: 27ABCPS1234K1Z5
Regex:   ^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z][1-9A-Z]Z[0-9A-Z]$

Because the PAN sits inside the GSTIN, you can read the PAN from any GSTIN — but one PAN can have many GSTINs, one per state.

CIN — 21 characters (company number breakdown)

The Corporate Identification Number issued by the Ministry of Corporate Affairs breaks down like this, using U72200MH2010PTC201234:

  • U — listing status: U unlisted, L listed.
  • 72200 — the 5-digit industry (NIC) code of the main business activity.
  • MH — the state of the registered office.
  • 2010 — the year of incorporation.
  • PTC — company type: PTC private limited, PLC public limited, FTC subsidiary of a foreign company, GOI government company, NPL not-for-profit (Section 8).
  • 201234 — the registration number.
Regex:  ^[LU][0-9]{5}[A-Z]{2}[0-9]{4}[A-Z]{3}[0-9]{6}$

IFSC — 11 characters

  • Characters 1–4: the bank code (HDFC, SBIN, ICIC…).
  • Character 5: always 0, reserved for future use.
  • Characters 6–11: the branch code (letters or digits).
Example: HDFC0001234
Regex:   ^[A-Z]{4}0[A-Z0-9]{6}$

Udyam (MSME) registration number

Format UDYAM-XX-00-0000000 — for example UDYAM-MH-26-0012345: the word UDYAM, a 2-letter state code, a 2-digit district code and a 7-digit serial number.

Regex:  ^UDYAM-[A-Z]{2}-[0-9]{2}-[0-9]{7}$

Other numbers you will meet

  • Aadhaar — 12 digits, never starting with 0 or 1; the last digit is a Verhoeff checksum, so a single mistyped digit is detectable offline.
  • UAN (EPFO) — 12 digits.
  • Voter ID (EPIC) — usually 3 letters followed by 7 digits, e.g. ABC1234567.
  • Driving licence — state code, RTO code, year of issue and a serial, e.g. MH12 2019 0001234 (spaces and hyphens vary by state).
  • Vehicle registration — state, RTO, series and number, e.g. MH12AB1234; Bharat-series plates look like 22BH1234AA.

Validate the format, then verify the number

Use these patterns to reject malformed input instantly in your form — uppercase it and strip spaces first. Then call a verification API to confirm the number actually exists, is active, and belongs to the person or business in front of you. A sandbox lets you exercise both paths without touching real people's data.

Frequently asked questions

What does the 4th letter of a PAN mean?

It shows the type of holder — P for an individual, C for a company, H for a HUF, F for a firm, T for a trust, and so on.

Is ABCDE1234F a valid PAN?

No. It matches the general five-letter, four-digit, one-letter shape, but "D" is not a valid holder-type letter, so it can never be a real PAN. It is only a documentation placeholder.

How do I read a CIN number?

A CIN is 21 characters: listing status (L/U), 5-digit industry code, state code, year of incorporation, 3-letter company type and a 6-digit registration number.

How many digits is an IFSC code?

An IFSC is 11 characters: a 4-letter bank code, the digit 0, and a 6-character branch code.

Does a correct format mean the number is real?

No — format checks only catch typos. Use a verification API to confirm the number exists and belongs to the right person or business.

Related APIs

More guides

Build with BILAPI

One key, a free sandbox and a predictable JSON envelope across every endpoint.

Get your API key