Aadhaar Verification Methods Compared
OTP eKYC, Offline XML, Secure QR, DigiLocker — what each one proves, who can use it, and how to choose.
"Aadhaar verification API" can mean several very different things. Some methods only confirm an Aadhaar number exists; others hand you UIDAI-signed identity data. They also differ in who is legally allowed to use them. Picking the right one up front saves you from building on a method your business cannot use.
1. Number validation (offline)
Every Aadhaar number has 12 digits and ends in a Verhoeff check digit, so you can catch most typos in your own code. This proves nothing about the person — only that the number is well-formed. Use it as a free first filter.
2. OTP-based eKYC (UIDAI authentication)
The customer enters their Aadhaar number, receives an OTP on their Aadhaar-linked mobile, and UIDAI returns their eKYC data. It is strong, because it proves the person controls the linked mobile — but full Aadhaar authentication and eKYC are restricted to entities that UIDAI has authorised, under the conditions the law permits. Most businesses outside that group cannot run it directly.
3. Offline XML — Paperless Offline eKYC
The customer downloads a password-protected XML file from the myAadhaar portal and shares it with you along with the share code. The file is digitally signed by UIDAI and contains name, date of birth, gender, address and photo, with mobile and email stored as hashes. You verify the signature to confirm the data is genuine and untampered.
- Consent-based and designed for offline verification by businesses.
- Does not reveal the full Aadhaar number.
- UIDAI-signed, so the data cannot be edited without detection.
4. Secure QR code
The QR code printed on e-Aadhaar and the Aadhaar letter carries UIDAI-signed demographic data and a photo. Scanning and verifying it is another offline method — useful for in-person or document-upload flows.
5. DigiLocker
The customer signs in to their own DigiLocker account and consents to share their Aadhaar. You receive UIDAI-issued data straight from the source, so it cannot be doctored. For most digital onboarding, this is the smoothest consent-based route.
Which one should you use?
- Catching typos in a form → number validation.
- Fully digital onboarding with strong, issuer-verified data → DigiLocker.
- Customer shares a file or you verify offline → Offline XML or Secure QR.
- You are an entity UIDAI has authorised for Aadhaar authentication → OTP eKYC.
Storing Aadhaar data safely
- Capture and record the customer's consent for every verification.
- Store a masked Aadhaar (only the last 4 digits visible) or a reference token — not the full number — unless you are specifically required and permitted to keep it.
- Encrypt Aadhaar data at rest, restrict access, and log every verification for audit.
