GSTIN Number Regular Expression

A regular expression to match a valid 15-digit GSTIN number (Goods and Services Tax Identification Number) in India, which is a unique identification number issued by the Ministry of Finance, Government of India (the MFIN) for a business entity registered under the Goods and Services Tax (GST) Act.

/\d{2}[A-Z]{5}\d{4}[A-Z]{1}[A-Z\d]{1}[Z]{1}[A-Z\d]{1}/g

Matches:

  • 18AABCU9603R1ZM
  • 22AABCU9603R1ZX
  • 07AABCU9603R1ZP

Non-matches:

  • 181AABCU9603R1Z
  • AABCU9603R1ZX
  • 7AABCU9603R1ZP

See Also:

Regex Is Copied!