Skip to main content

PII Types

Border detects 20+ types of personally identifiable information, organized by category.

Financial

TypeDescriptionValidation
credit_cardCredit/debit card numbersLuhn algorithm + network detection
ibanInternational Bank Account NumbersMOD-97 checksum
aba_routingUS bank routing numbersWeighted checksum
crypto_addressBitcoin, Ethereum addressesFormat validation

Credit Card Networks

Border identifies card networks from prefixes:
NetworkPrefix
Visa4xxx
Mastercard51-55xx, 2221-2720
Amex34xx, 37xx
Discover6011, 644-649, 65
JCB3528-3589
UnionPay62xx

Personal

TypeDescriptionValidation
emailEmail addressesFormat validation
phonePhone numbers (US/international)Format validation
ssnUS Social Security NumbersArea/group rules
passportPassport numbersFormat match
drivers_licenseDriver’s license numbersFormat match
date_of_birthBirth dates (multiple formats)Date validation

SSN Validation

Border validates SSN structure:
  • Area code (first 3 digits): Not 000, 666, or 900-999
  • Group number (middle 2 digits): Not 00
  • Serial number (last 4 digits): Not 0000

Credentials

TypeDescriptionPattern
api_keyGeneric API keysContext-aware
aws_keyAWS Access Key IDsAKIA..., ABIA...
stripe_keyStripe API keyssk_live_, pk_live_
github_tokenGitHub tokensghp_, gho_, etc.
slack_tokenSlack tokensxoxb-, xoxp-
jwtJSON Web TokenseyJ... format

Network

TypeDescription
ip_addressIPv4 addresses
ipv6_addressIPv6 addresses
mac_addressMAC addresses

Other

TypeDescriptionValidation
vinVehicle ID NumbersCheck digit validation
medical_recordMedical record numbersMRN prefix format

Custom Patterns

Add your own patterns:
init({
  customPatternDefinitions: [
    {
      name: "employee_id",
      pattern: /EMP-[0-9]{6}/g,
      confidence: "high",
    },
  ],
});

Disabling Types

Disable specific detectors:
init({
  disabledDetectors: ["ip_address", "mac_address", "date_of_birth"],
});

Next Steps