Skip to content
2345 6789 1234LOAN FILEENGINEDETECT · READ · COVER12341234MASKED COPYPage_1 is_number_masked: 1Page_1 is_QR_masked: 1
The engine

Find it, prove it, cover exactly enough

A detector finds candidates, reading and a checksum prove them, a full read of the page catches the rest, and the cover leaves the last four digits readable.

Four phases

What happens to every page

number?QR?0°90°180°270°FOUR TURNS OF EVERY PAGE
Find

A detector looks at every page four ways

  • Rendered at 200 dpi with even lighting
  • Cards, number boxes and QR codes, on all four rotations
  • The first opinion, never the last
2345 6789 123412 digitsfirst 2–9Verhoeffchecksumlabel or cardbeside it
Prove

A number is an Aadhaar number only when it proves it

  • Twelve digits starting 2–9, read in the box
  • The Verhoeff checksum must pass
  • Aadhaar wording or a card must be nearby: statements and account numbers stay
आधार संख्या1234THE LABEL SAYS WHAT THE NUMBER IS
Read the page

What detection missed, the page read catches

  • Every line of the page, in English and Hindi
  • A label beside a number says what it is: आधार, UID, Aadhaar No.
  • The same number elsewhere in the file is covered too, even misread
1234FIRST EIGHT COVERED · LAST FOUR STAY
Cover

Exactly enough, and no more

  • The cover ends in the gap after the eighth digit; the last four stay, as UIDAI prescribes
  • QR codes are covered whole
  • Dates, amounts, names and account numbers are left alone
Eight steps

The same steps for a card photo, a 400-page loan file and a sale deed

  1. 1

    Render

    PDF pages are rendered at 200 dpi and every page is cleaned to even lighting, so a shaded phone photo and a flat scan look alike to the next steps.

    Very large photos are worked on at 8 megapixels and the covers painted back on the original at full size.

  2. 2

    Detect

    A detector trained on Indian KYC documents boxes Aadhaar numbers and QR codes, looking at the page four ways round so a sideways or upside-down card is still found.

    The detector is the first opinion, not the last: a PAN, a date of birth and an amount grid can all look like a printed number strip.

  3. 3

    Read each box

    Every candidate box is read with OCR and the digits grouped the way a card prints them.

    A box that reads as fewer than twelve digits is read again from the raw page, enlarged.

  4. 4

    Verify

    A number must prove itself: twelve digits, printed 4-4-4 or run together, never opening with 0 or 1, and a valid Verhoeff checksum; or printed as a card prints it on a page that says Aadhaar.

    Bank statements, credit reports and tables of figures are recognised as pages of numbers, so a reference that happens to pass the checksum is left alone.

  5. 5

    Read the page

    Every line of the page is read for numbers the detector missed: a number written into a form, a deed's "Aadhaar No." in running text, the small second copy under a card's photo, a number split across two lines.

    Labels in Hindi are read by a Devanagari recogniser, so "आधार संख्या" in a sale deed is as good a label as "Aadhaar No." in English.

  6. 6

    Decode QR codes

    Every QR code on the page is decoded. One that carries UIDAI's record is covered wherever it is, whether the detector boxed it or not; a payment code, an e-stamp or a link is left alone.

    Older Aadhaar letters carry the full number in a plain-text QR; the newer secure QR carries the last four digits. Both are covered whole.

  7. 7

    Look across the file

    A card photographed front and back, or copied twice into one PDF, often reads cleanly on one page and a digit wrong on the other. A number confirmed on one page covers its misread copy on the others.

    The numbers are held in memory for the one document and never logged.

  8. 8

    Cover

    The first eight digits are painted over and the last four stay readable, UIDAI's own masked form. The cover ends in the gap after the eighth digit, not inside it. QR codes are covered whole.

    Where the digits cannot be placed exactly, the whole number is covered rather than risk a digit showing.

What it masks

Everything an Aadhaar number hides in

  • 1234

    Card photos, even tilted or blurred

  • 12341234

    e-Aadhaar PDFs, both halves

  • 1234

    Deeds and agreements, in Hindi too

  • 1234

    Application forms, written or typed

  • 1234

    Statements and reports, numbers left alone

  • QR codes, covered whole

  • XXXXXXXX1234XXXXXXXX1234

    Excel cells, replaced in place

  • .ZIP

    ZIP archives, folder structure kept

What it leaves alone

Covering too much is also a failure

A reviewer still needs the dates, the amounts and the last four digits.

  • The last four digits

    UIDAI's masked form keeps them readable so a file can still be reconciled against its paperwork..

  • PAN, dates, amounts, phone and account numbers

    Only a number that passes the Aadhaar checksum and the page's evidence is covered; a page of figures is never masked on a lucky match..

  • Virtual IDs

    A 16-digit VID is left as printed, by decision: it is UIDAI's revocable substitute for the number..

  • Already-masked numbers

    A number with a painted block beside its last four digits is recognised as masked and not covered a second time..

  • Other QR codes

    Payment codes, e-stamps and links decode as not Aadhaar's and stay readable..

  • Driving licences and other identifiers

    A licence number whose twelve middle digits happen to pass the checksum is refused before the checksum is even asked..

Architecture

Where the engine runs

The hosted service and the AWS Marketplace edition share one design; on premises the engine band runs alone, on your machine.

YOUR SIDETHE SERVICE (AWS MUMBAI, OR YOUR OWN AWS ACCOUNT)Your systemsPOST /aadhaar-maskingLOS, DMS, onboarding app, scriptYour archiveZIPs, folders, S3 linksAPIWAF · TLS · API keyChecks the key, type and sizeAnswers at once, or startsa background task you pollDeletes uploads after a dayMasking engineserverless · 10 GB · GravitonUp to 40 running at once by defaultLong PDFs fan out in 8-page chunksBackground workerZIPs, Excel, very long PDFssame engine imagenowlaterPrivate storageuploads/ · masked-output/Encrypted, no public access,deleted after a dayTask recordsStatus only, no document content, 2 daysmasked file back by signed link · per-page record in the JSONINSIDE THE ENGINE, EVERY PAGE01Render200 dpi, even light02Detect4 turns of the page03Readdigits in each box04VerifyVerhoeff + evidence05Read pageHindi labels too06Decode QRUIDAI's XML07Whole filemisread copies08Coverfirst 8, last 4 stay1234
The hosted service and the AWS Marketplace edition are the same stack; in the Marketplace edition everything under "the service" runs in your own account.XXXX XXXX 1234
Get started

Judge it on one of your own files

Upload a card photo, a scan or a short PDF and the production engine masks it while you wait, with a per-page record of what was covered. Or book thirty minutes with a HabileLabs engineer to see it on your document types and plan a deployment in your AWS account.

Or email support@habilelabs.io · Monday to Friday, 10:00–19:00 IST (excluding public holidays)