Documents

Information types

Every sensitive-information type Redact Document finds: national IDs, dates of birth, card and bank numbers, health numbers, contact details, network identifiers, keys and passwords — with regions, formats, checks, context words and confidence.

Redact Document finds sensitive information by type. Each type is recognised in three steps:

  1. Format — a pattern for what it looks like (123-45-6789, AB 12 34 56 C, 16 digits in groups).
  2. Validation — what it must satisfy to be real: a check digit (Luhn for cards and Canadian SINs, mod-11 for NHS, IRD and Australian TFNs, mod-97 for IBANs and French NIRs, Verhoeff for Aadhaar, the ICAO 7-3-1 digits of a passport MRZ), a valid range (no SSN starts with 000, 666 or 9), a real calendar date, a known bank and branch.
  3. Context — words nearby (up to about 48 characters before and 24 after, in the same paragraph, cell or line) that say what it is: "SSN", "date of birth", "IRD", "passport". Some types need them (a 9-digit passport number looks like any other number), and for the rest they raise the confidence.

The result is a confidence — low, medium or high — compared with the step's Minimum confidence (default medium). Choose types in the designer by category, filter them by region, or use * (every type), @high (every type that can reach high confidence) or category:<id> in info_types.

Reference

Typeinfo_types valueCategoryRegionsFormatValidationContext wordsConfidence
US Social Security numberus_ssnIdentityUS123-45-6789, 123 45 6789; 9 digits in a row only next to a context wordArea not 000, 666 or 900–999; group not 00; serial not 0000; not all one digitSSN, social security, SS#medium; high with context
US ITINus_itinIdentityUS9XX-7X-XXXX (dashes or spaces)Starts with 9; middle group 50–65, 70–88, 90–92 or 94–99ITIN, taxpayer identificationmedium; high with context
US passport numberus_passportIdentityUS9 digits, or a letter and 8 digitsContext word requiredpassport (required)high (with context)
US driver's licenseus_drivers_licenseIdentityUSState formats vary: up to 2 letters and 5–14 digits, or a letter and digit groups (D123-4567-8901)Context word requireddriver's license, driver license, DL, DLN (required)medium (with context)
Date of birthdate_of_birthIdentityglobalAny date format: 1985-03-12, 12/03/1985, 03/12/1985, 12.03.85, 12 March 1985, Mar 12, 1985, 12-Mar-1985A real calendar date in the last 120 years (not in the future); the context word must come just before it on the same line (within 16 characters, no other number in between)DOB, D.O.B., date of birth, birth date, born, birthday, geboren, né(e) le, fecha de nacimiento, data di nascita (required)high (with context); without it the date is a plain Date
DatedateIdentityglobalThe same formats as Date of birthA real calendar date (day/month or month/day)—medium
UK National Insurance numberuk_ninoIdentityUKQQ 12 34 56 C (spaces optional)Valid prefix letters (not D, F, I, Q, U, V; second not O; not BG, GB, KN, NK, NT, TN, ZZ); suffix A–Dnational insurance, NI number, NINOmedium; high with context
UK passport numberuk_passportIdentityUK9 digits, or 2 letters and 7 digitsContext word requiredpassport (UK, British, HM) (required)high (with context)
Canada Social Insurance numberca_sinIdentityCA046 454 286, 046-454-286 or 9 digitsLuhn check; does not start with 0 or 8SIN, social insurancelow (9 digits) or medium (grouped); high with context
Australia Tax File Numberau_tfnIdentityAU123 456 782 or 8–9 digitsWeighted mod-11 checksumTFN, tax file numberlow (digits only) or medium (grouped); high with context
New Zealand IRD numbernz_irdIdentityNZ49-091-850, 136-410-132 or 8–9 digitsIRD mod-11 check digit (primary and secondary weights); 10,000,000–150,000,000IRD, inland revenue, tax number, GST numberlow (digits only) or medium (grouped); high with context
New Zealand driver licencenz_drivers_licenceIdentityNZ2 letters and 6 digits: AB123456Context word requireddriver licence, licence number, DL (required)high (with context)
German tax ID (Steuer-ID)de_tax_idIdentityDE11 digits (spaces allowed): 86 095 742 719ISO 7064 MOD 11,10 check digit; first digit not 0; one digit repeated 2–3 times in the first tenSteuer-ID, Steueridentifikationsnummer, IdNr, tax IDlow; high with context
French social security number (NIR / INSEE)fr_nirIdentityFR15 digits: 2 84 12 75 123 456 87 (Corsica 2A / 2B allowed)Sex 1/2, month 01–12 (or 20+), and the 2-digit key (97 − number mod 97)sécurité sociale, NIR, INSEE, numéro de sécumedium; high with context
Spanish DNI / NIEes_dniIdentityES12345678Z (DNI) or X1234567L (NIE)Control letter (number mod 23)DNI, NIE, documento nacionalmedium; high with context
Italian fiscal code (codice fiscale)it_fiscal_codeIdentityIT16 characters: RSSMRA85T10A562SStructure (surname, name, year, month letter, day, place) and the control charactercodice fiscale, CFhigh
Dutch citizen service number (BSN)nl_bsnIdentityNL9 digits: 111222333, 1112.22.33311-proef (elfproef)BSN, burgerservicenummer, sofinummerlow; high with context
India Aadhaar numberin_aadhaarIdentityIN2345 6789 0124 (12 digits, first 2–9)Verhoeff check digitAadhaar, UIDAI, UIDlow (digits only) or medium (grouped); high with context
India PANin_panIdentityINAAAPZ1234CStructure: 5 letters (4th is the holder type), 4 digits, a letterPAN, permanent account number, income taxmedium; high with context
Singapore NRIC / FINsg_nricIdentitySGS1234567D (S, T, F, G or M, 7 digits, a letter)Check letter (weighted mod 11; M series by format)NRIC, FIN, IC numbermedium; high with context
Passport / ID machine-readable zone (MRZ)passport_mrzIdentityglobalThe P<…<<… name line and the 44-character data line of a passport (TD3), or the 30-character lines of an ID card (TD1)ICAO 9303 check digits (document number, birth date, expiry, composite)—high (check digits pass); name line medium
Credit / debit card numbercredit_cardFinancialglobal13–19 digits, spaces or dashes allowed: 4111 1111 1111 1111Luhn check, issuer prefix and length (Visa, Mastercard, Amex, Discover, JCB, Diners, UnionPay, Maestro)card, credit, debit, Visa, Mastercardhigh (known issuer); low (Luhn only)
IBANibanFinancialglobal, EUGB82 WEST 1234 5698 7654 32ISO 13616 mod-97 checkIBANhigh
SWIFT / BIC codeswift_bicFinancialglobal8 or 11 characters: DEUTDEFF, DEUTDEFF500Bank code, a real country code, location; a context word is needed for mediumSWIFT, BIClow; medium with context
US ABA routing numberus_routing_numberFinancialUS9 digits: 021000021ABA 3-7-1 checksum and a valid Federal Reserve prefixrouting, ABA, RTN, transitlow; high with context
US bank account numberus_bank_accountFinancialUS8–17 digitsContext word requiredaccount number, acct, checking, savings (required)medium (with context)
UK sort code and accountuk_bank_accountFinancialUK12-34-56 12345678; a sort code alone next to "sort code"Sort code NN-NN-NN with an 8-digit account, or a context wordsort code, accountmedium; high with context
Australia BSB and accountau_bank_accountFinancialAU062-000 12345678; a BSB alone next to "BSB"BSB NNN-NNN with a 6–10 digit account, or a context wordBSB, accountmedium; high with context
New Zealand bank accountnz_bank_accountFinancialNZ01-0902-0068389-00 (bank, branch, account, suffix)Known bank and branch range; the Payments NZ check digit raises it to highaccount, bank accountmedium (bank and branch valid); high (check digit passes or context)
Crypto wallet addresscrypto_walletFinancialglobalBitcoin 1… / 3… (Base58) or bc1… (Bech32); Ethereum 0x and 40 hex digitsBitcoin: Base58Check (double SHA-256) or Bech32/Bech32m checksum. Ethereum: formatwallet, bitcoin, BTC, ethereum, ETHBitcoin high; Ethereum medium, high with context
Email addressemailContactglobalname@example.comDomain with a 2–24 letter top-level domain—high
Phone numberphoneContactglobalE.164 (+64 21 555 0100) and national formats with spaces, dots, dashes or brackets7–15 digits; not a date; not one digit repeatedphone, tel, mobile, cell, fax, callhigh (+ country code or context); medium (grouped); low (digits only)
Street addresspostal_addressContactglobalA number, capitalised street name and a street type (Street, Rd, Ave, …), optionally a town and postcodeHeuristic (pattern only)address, lives at, resides, deliver tomedium; high with context
UK postcodeuk_postcodeContactUKSW1A 1AARoyal Mail outward / inward letterspostcode, addressmedium; high with context
US ZIP codeus_zipContactUS94105, 94105-1234Context required: a state abbreviation just before it, or "ZIP"ZIP, state abbreviation (CA 94105) (required)medium (with context)
Canada postal codeca_postal_codeContactCAK1A 0B1Canada Post letters (no D, F, I, O, Q, U; first not W or Z)postal codemedium; high with context
Australia postcodeau_postcodeContactAU4 digits after a state: NSW 2000Context required: state abbreviation just before it, or "postcode"NSW, VIC, QLD, SA, WA, TAS, NT, ACT, postcode (required)medium (with context)
New Zealand postcodenz_postcodeContactNZ4 digits after a town: Wellington 6011Context required: a New Zealand town or city just before it, or "postcode"Auckland, Wellington, Christchurch, … , postcode, New Zealand (required)medium (with context)
UK NHS numberuk_nhsHealthUK943 476 5919 or 10 digitsNHS mod-11 check digitNHS, health servicelow (10 digits) or medium (grouped); high with context
New Zealand NHI numbernz_nhiHealthNZZZZ0016 (3 letters, 4 digits) or the new ZZZ00AC formatNHI mod-11 (old) or mod-23 (new) check character; no I or ONHI, national health index, patientlow; high with context
Australia Medicare numberau_medicareHealthAU2123 45670 1 (10 digits, optional issue number)First digit 2–6; weighted check digitMedicarelow (digits only) or medium (grouped); high with context
US Medicare Beneficiary Identifierus_mbiHealthUS1EG4-TE5-MK73 (11 characters)CMS MBI structure (letters exclude S, L, O, I, B, Z)Medicare, MBI, beneficiarymedium; high with context
Medical record numbermedical_record_numberHealthglobal5–12 digits, optionally with a letter prefix or a dashContext word requiredMRN, medical record, patient ID, hospital number, chart number (required)high (with context)
IPv4 addressip_addressTechnicalglobal192.0.2.10Four octets 0–255; not a version number like 1.2.3.4 in "version 1.2.3.4"IP, host, server, addressmedium; high with context
IPv6 addressipv6_addressTechnicalglobal2001:db8::1A valid IPv6 addressIP, hosthigh
MAC addressmac_addressTechnicalglobal00:1A:2B:3C:4D:5E, 00-1A-…, 001a.2b3c.4d5eSix hex pairs with one separatorMAC, hardware address, ethernetmedium; high with context
URLurlTechnicalglobalhttps://…http / https link—medium
API key or tokenapi_keyCredentialsglobalKnown prefixes (sk-, sk_live_, AKIA, ghp_, github_pat_, xoxb-, AIza, glpat-, npm_, SG.) or a long random value after key / secret / token =Prefix and length; others: Shannon entropy ≥ 3.5 bits per characterapi key, secret, token, access keyhigh (known prefix); medium (entropy)
JSON Web TokenjwtCredentialsglobaleyJ….eyJ….…The header decodes to JSON with alg—high
Private keyprivate_keyCredentialsglobal-----BEGIN … PRIVATE KEY----- … -----END … PRIVATE KEY-----PEM armour—high
PasswordpasswordCredentialsglobalThe value after password:, pwd=, passcode:4–64 characters (only the value is redacted)password, passwd, pwd, passcode, PIN (required)high
Person name (AI)person_nameIdentityglobalNames of people, found by the AI model you chooseProbabilistic: a model's judgement, not a pattern—medium (AI)

"(required)" after the context words means the type is only found next to one of them.

Dates of birth

A date of birth is any date in the formats above with a date-of-birth word just before it on the same line — DOB, D.O.B., date of birth, birth date, born (on), birthday, and geboren, né(e) le, fecha de nacimiento, data di nascita, geboortedatum — at most 16 characters before it with no other number in between, or "(date of birth)" right after it. It must be a real date, not in the future and not more than 120 years ago. Numeric dates are read day-first or month-first, whichever is a real date.

TextFound as
DOB: 12/03/1985Date of birth (high)
Born on 3 March 1990Date of birth (high)
1985-03-12 (date of birth)Date of birth (high)
Invoice date 12/03/1985Date (medium)
DOB 12/03/1985, next visit 01/02/2026Date of birth, then Date
DOB 05/05/2031Date (in the future)

Choose Date of birth without Date to redact birth dates and keep every other date.

Overlaps

Many identifiers are runs of digits that more than one type could claim. When matches overlap, the one with the higher confidence wins, then the more specific type (an ID with a check digit before a phone number, a postcode or a plain date), then the longer match. A text is never reported or redacted twice.

Limits

  • Detection is pattern-based: a number that passes a check is not necessarily what it looks like (one in eleven random 9-digit numbers passes the Dutch BSN check), and a real identifier written in an unusual way can be missed. Use Detect only on sample documents first.
  • Ethereum addresses are checked by format only (no EIP-55 checksum). Singapore M-series FINs are checked by format only. A New Zealand bank account whose check digit does not match is still found, with medium confidence (bank and branch must be valid).
  • Driver's licence and passport numbers, medical record numbers, US bank accounts and ZIP / Australian / New Zealand postcodes have no syntax of their own, so they are found only with a context word.
  • Names of people need AI detection (probabilistic, off by default).