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.
How to validate Indian IDs
- Pick the ID type: PAN, Aadhaar, GSTIN, IFSC, PIN code, mobile number or UPI ID.
- Type or paste the value. Spaces and hyphens are ignored, and letters are turned to capitals where the format needs it.
- 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.
More free tools
-
JSON to Mongoose Schema Converter
Paste a JSON document and get a ready-to-use Mongoose schema and model, with nested schemas, ObjectId refs and timestamps.
-
JSON to Zod Schema Generator
Turn any JSON into a Zod schema plus its TypeScript type, ready to validate API responses and form data.
-
JSON to TypeScript Interface Generator
Generate clean TypeScript interfaces from JSON in one paste, including nested objects, arrays and optional fields.
-
SQL to MongoDB Query Converter
Convert SQL queries to MongoDB find(), aggregate(), updateMany() and more, for mongosh or Mongoose.
-
MongoDB Connection String Checker and Builder
Find what’s wrong with a MongoDB URI, from unencoded passwords to SRV ports, or build a correct one for Atlas or a local server.
-
MongoDB ObjectId to Timestamp Converter
See when any MongoDB document was created from its _id, or turn a date into an ObjectId for fast range queries.
