HomeRedaction Guides → Redact Passport Numbers

How to Redact Passport Numbers in a PDF

Passport numbers appear in immigration records, travel documents, and verification forms. Because formats differ by country, label-aware patterns are safest.

Important: PermanentRedaction permanently removes text from text-based PDFs. Scanned/image-only PDFs are not supported.
Quick notes
Tip: Many PDF editors can only mask text with black rectangles. Masking is not the same as permanently deleting text from the PDF layer.

Step-by-step

Step 1
Locate passport numbers in forms, identification documents, or travel records.
Step 2
Use a label-aware rule to target passport numbers.
See Example: Passport number label
Regex
(?i)\bpassport\s*(?:number|no\.?|#)\b\s*[:\-]?\s*[A-Z0-9]{6,12}\b
Matches
  • Passport Number: 123456789
  • Passport No. A1234567
Passport formats differ globally. Preview matches to confirm accuracy.
Using regex rules in PermanentRedaction
PermanentRedaction supports deterministic redaction rules using regular expressions. Patterns like this can be applied across an entire document to permanently remove matching text.
Step 3
Preview matches across the document.
Step 4
Export the final PDF with the matched text removed.
Step 5
Verify the exported PDF using search and copy tests.

Common mistakes to avoid

Assuming one global format
Passport formats vary widely by country.
Matching unrelated numbers
Travel documents may contain many other numeric identifiers.
Skipping verification
Always confirm the exported file removes underlying text.

FAQ

Do passport numbers have a universal format?
No. Different countries use different numbering systems.
Should passport numbers always be redacted?
Many organizations treat passport numbers as sensitive identifiers.
Are scanned passports supported?
Not currently. The PDF must contain a text layer.