# Redact passport numbers

> Redact passport numbers from travel documents, onboarding packets, and KYC notes.

Canonical: https://bitbanger.in/entities/passport
Last updated: 2026-10-27

Category: Identity and government IDs · Entity type: `identity.passport`

Passport numbers have no universal format, so Redactly detects them from an explicit label such as Passport No: rather than from shape. That keeps precision high across issuing countries.

## How Redactly detects passport numbers

- Detected by a context cue that pairs a passport label with the value that follows it.
- Works across issuing countries because no format is assumed.
- An expiry date is not part of the number, so it is left alone unless it is separately identified as a birth date.

## Why redact passport numbers?

A passport number plus a name is enough to attempt identity verification fraud.

## Example request

```bash
curl -X POST https://api.bitbanger.in/v1/redact \
  -H "X-API-Key: rdct_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"text": "Passport No: X1234567, expires 2031-04-18.", "style": "replace"}'
```

## FAQ

**Does Redactly redact passport numbers automatically?**

Yes. Send text to the API and every detected type is redacted, including passport numbers. To redact only this type, pass the value identity.passport in the entities filter. No training or configuration is required.

**What happens to passport numbers after redaction?**

With style set to replace, each match becomes [identity.passport] — the entity type in square brackets. Setting style to mask replaces every character with a block character, and remove deletes the span entirely.

## Related entity types

- [National ID numbers](https://bitbanger.in/entities/national-id) — Redact national identity numbers such as NIN, DNI, PESEL, and similar government identifiers.
- [Driver's licence numbers](https://bitbanger.in/entities/drivers-license) — Redact driver's licence numbers from onboarding forms, insurance claims, and fleet records.
- [Dates of birth](https://bitbanger.in/entities/date-of-birth) — Redact dates of birth in numeric, ISO, and written month formats from text and tabular data.

Try it on your own text: https://bitbanger.in/entities/passport
