Kavach

Keep your Aadhaar, PAN and UPI out of AI chats

Kavach (कवच, "shield") warns you before you paste or send Indian personal details to ChatGPT, Claude or Gemini, and swaps them for placeholders like [PAN_1]. It runs entirely on your device.

Chrome Web Store: coming soon View source on GitHub

Free and open source (MIT). Interface in English and Hindi.

Kavach banner on ChatGPT listing the personal details found in pasted text, with Mask, Send anyway and Cancel buttons
1. Kavach pauses and tells you what it found.
The message box after masking, showing placeholders such as [PAN_1] and [UPI_1] instead of the real values
2. Mask swaps the values for placeholders.
An AI reply that keeps the placeholders unchanged
3. The AI helps without seeing the real values.

What it detects

Aadhaar

12 digits, checked with the official Verhoeff check digit.

PAN

Format and holder-type letter.

UPI ID

name@okaxis, number@paytm and other handles.

Bank details

IFSC codes, and account numbers when "account", "a/c" or "khata" is nearby.

Mobile number

Indian mobiles with +91, 0 or 10 digits.

GSTIN and email

GSTIN with its check character; standard email addresses.

Understands English, Hinglish and Hindi context: "mera aadhaar", "khata number", "मोबाइल".

Private by design

Read the full privacy policy. Kavach reduces risk but can miss things, so check before you send. It is not legal advice.

Accuracy

On a public synthetic benchmark of 600 held-out sentences in English, Hinglish and Hindi, none of which were used to tune Kavach:

KavachPresidio, defaultPresidio + Indian recognizers
Personal values masked95.7%55.9%79.3%
Clean sentences wrongly flagged32 / 14144 / 14165 / 141

Compared with Microsoft Presidio 2.2.364. Full results, weak spots and how to reproduce them.

For developers

The same detection engine is a Python package with no dependencies. Mask before the LLM call, restore after:

pip install kavach-pii
from kavach import Kavach

session = Kavach().session()
safe = session.mask("My PAN is ABCPE1234F, refund to rahul@okaxis")
# 'My PAN is [PAN_1], refund to [UPI_1]'
reply = call_llm(safe)
print(session.unmask(reply))

Also a command-line scanner (kavach scan) for pre-commit and CI checks, and an MCP server (pip install "kavach-pii[mcp]") that lets AI assistants such as Claude work from a redacted copy of a file without seeing the personal data in it. Read the docs · PyPI