Home →
Redaction Guides
→ Redact Phone Numbers
How to Redact Phone Numbers in a PDF
Phone numbers appear in many formats (parentheses, dashes, spaces, country codes). Use patterns matched to what your documents contain, preview results, then verify the exported PDF.
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
Scan your PDF for how phone numbers are formatted (US vs international, separators, extensions, labels like “Phone:” or “Tel:”).
Step 2
Start with a conservative phone-number regex for the formats you see and preview matches.
See Example: Phone number (common US formats)
Regex
\b(?:\+?1[-.\s]?)?(?:\(\d{3}\)|\d{3})[-.\s]?\d{3}[-.\s]?\d{4}\b
Matches
- (904) 555-1212
- 904-555-1212
- 904 555 1212
- +1 904 555 1212
Phone patterns are tricky. If you see false positives (invoice IDs, short codes), tighten using labels or nearby context.
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
If your PDFs include extensions, add an extension-aware rule.
See Example: Phone number with extension
Regex
\b(?:\+?1[-.\s]?)?(?:\(\d{3}\)|\d{3})[-.\s]?\d{3}[-.\s]?\d{4}(?:\s*(?:x|ext\.?|extension)\s*\d{1,6})?\b
Matches
- (904) 555-1212 ext 9
- 904-555-1212 x123
Only use this if your documents actually contain extensions; otherwise keep it simpler.
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 4
Preview matches on multiple pages and confirm you are only capturing true phone numbers.
Step 5
Export a final PDF where matched phone numbers are permanently removed.
Step 6
Verify the exported PDF by searching for known phone numbers and using copy/paste tests around redacted areas; keep the verification report.
Common mistakes to avoid
Matching long numeric IDs
Avoid “any 10 digits” patterns. Those can remove case numbers, invoice IDs, or other unrelated references.
Ignoring alternate formatting
Phone numbers may appear with parentheses, spaces, or country codes across different pages. Add rules for the formats you actually see.
Not checking signatures and footers
Contact blocks often repeat at the bottom of every page.
FAQ
Do you support international phone numbers?
You can redact international formats, but patterns vary widely. Start with what your documents contain, preview matches, and tighten to avoid false positives.
Should I redact only the last 4 digits?
That depends on your policy. If you keep part of the number, create rules that match only the portion you intend to remove.
What if the PDF is scanned?
Scanned/image-only PDFs are not supported in PermanentRedaction at this time.