Use case

PII redaction for documents you have no parser for

The Aadhaar and PAN endpoints know what they are looking at. This one does not, and that is the point — a KYC folder is full of passports, licences, voter cards, utility bills and bank statements that no document-specific tool will touch.

Talk to our technical team → — for integration questions, a security review or a volume estimate.

Eleven identifier types

On by default
Aadhaar (Verhoeff checksum validated), VID, PAN, passport, voter EPIC, driving licence, GSTIN, IFSC, Indian mobile numbers, email addresses.
Off by default
Bank account numbers. Nine to eighteen digits with no checksum describes an account number, an invoice number, a policy number and a customer ID equally well. On by default it would quietly destroy documents, so you enable it where you know what you are processing.
False positives are the failure that matters. A redactor that covers an invoice number because it is nine digits long has destroyed the document it was meant to make shareable — and unlike a missed number, nobody can undo it. Every type here is either checksum-validated, structurally distinctive, or off by default.

How it finds identifiers on a document it does not recognise

Why a regex is not enough

Every team that has tried this in-house has written the twelve-digit regex. Here is what it matches that it should not, and misses that it should.

False positives
A phone number with a country code, an invoice number, a policy number, a transaction reference. Twelve digits is not a rare shape on a business document.
The checksum
An Aadhaar number carries a Verhoeff check digit. Validating it eliminates almost every false positive in one step, and it is not something a regular expression can express.
Grouped printing
Numbers print as three groups of four. Token-level matching sees "1234", "5678", "9012" and matches none of them.
Orientation
Photographed documents arrive rotated. A single-orientation pass misses most real uploads.
The VID
A sixteen-digit Virtual ID authenticates exactly like an Aadhaar number. Teams that mask Aadhaar and stop are storing an equally sensitive credential in the clear.

Redaction and masking are different products

Mask
Cover the first eight digits, leave the last four. The document still functions as a KYC record and still identifies the holder. This is what you keep.
Redact
Cover the identifier entirely. The document becomes shareable and stops being identity evidence. This is what you send.

Choosing wrongly is a quiet failure in both directions: redact what you needed to keep and the file no longer evidences anything; mask what you were sending outward and you have shared four digits and a name with someone who should have had neither.

Rule of thumb: mask what stays inside, redact what leaves.

Questions we get asked

Will it redact things it should not?

That risk is the reason for the design. Every type on by default is checksum-validated or structurally distinctive, and the one genuinely ambiguous type — bank account numbers — is off unless you ask for it.

Can we choose which types to redact?

Yes. Pass the types you want and the rest are left alone. GET /api/v1/pii-types lists them all with a description and whether each is on by default, and it needs no API key so you can read it before one is issued.

Does it remove names?

No. Names are not pattern-detectable without a model that would remove the wrong ones as often as the right ones. This covers identifiers, not free text.

Is the result reversible?

No. Images are painted over and PDFs are rasterised before the redaction is drawn, so there is no text layer left underneath.

Why not just write a regex for twelve digits?

Because twelve digits also describes a phone number with a country code, an invoice number and a policy number, and because Aadhaar is printed in groups of four so a token-level match finds nothing. The Verhoeff checksum removes almost all the false positives, and it is not something a regex can express.

Should we mask or redact?

Mask what stays inside your organisation, because the document still has to function as a KYC record. Redact what leaves, because the recipient does not need to identify the person from it.

Related

Talk to us about your document volume

Tell us how many documents a month you process and what your peak looks like. We will size a plan, provision a key with a test quota, and answer a security questionnaire if you need one.