PAN, Aadhaar, GST and IFSC Validator

Check PAN, Aadhaar, GSTIN, IFSC, PIN code, mobile and UPI formats, with real checksum tests and copy-ready regex.

Regex
JavaScript
Checks format and checksums in your browser. Nothing is sent or stored.

How to validate Indian IDs

  1. Pick the ID type: PAN, Aadhaar, GSTIN, IFSC, PIN code, mobile number or UPI ID.
  2. Type or paste the value. Spaces and hyphens are ignored, and letters are turned to capitals where the format needs it.
  3. Read the checks, then copy the regex or the JavaScript function for your own form validation.

The validator runs in your browser and stores nothing, so you can safely test real values.

Formats and checksums at a glance

ID Format Extra check
PAN 5 letters, 4 digits, 1 letter (ABCPE1234F) 4th letter is the holder type, such as P for an individual or C for a company
Aadhaar 12 digits, not starting with 0 or 1 Last digit is a Verhoeff check digit
GSTIN 2-digit state code + PAN + entity number + Z + check character Base-36 checksum on the last character
IFSC 4 letters, a zero, 6 letters or digits (SBIN0001234) First 4 letters are the bank code
PIN code 6 digits, not starting with 0 First digit is the postal zone
Mobile 10 digits starting with 6–9, optional +91 or 0 None
UPI ID name@handle Handle is the bank or app, such as okaxis or ybl

Format checks are not verification

A value can pass every check here and still not belong to a real person or business. Format validation is for catching typos early in a form. Before you rely on an ID for payments, invoices or KYC, confirm it with the official source: the Income Tax e-filing portal for PAN, the GST portal for GSTIN, UIDAI-approved services for Aadhaar, and the payment app for UPI.

Handle Aadhaar numbers with extra care. Show only the last four digits in your interface, and don’t store full numbers unless your app is legally allowed to.

Using the regex in a MERN app

Validate on both sides: in the React form for fast feedback, and again in your Express API, because browser checks can be bypassed. With Mongoose you can add the same pattern to the schema with the match option, for example pan: { type: String, uppercase: true, match: /^[A-Z]{5}[0-9]{4}[A-Z]$/ }.

Frequently asked questions

What is the regex for a PAN card number?

Use ^[A-Z]{5}[0-9]{4}[A-Z]$. Convert the input to capitals and remove spaces before testing it.

How is the Aadhaar number checked?

Aadhaar numbers are 12 digits and the last digit is a check digit calculated with the Verhoeff algorithm. The tool recalculates it, which catches most single-digit typos and swapped digits.

How do I validate a GSTIN?

Match the pattern ^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z][1-9A-Z]Z[0-9A-Z]$, check that the first two digits are a real state code, and verify the last character with the GSTIN base-36 checksum. The tool does all three.

Is my data stored?

No. All checks run in your browser and nothing is sent to a server.

logo

Oh hi there 👋
It’s nice to meet you.

Sign up to receive awesome content in your inbox.

We don’t spam! Read our privacy policy for more info.

More free tools