HomeRedaction Guides → Redact Bank Numbers

How to Redact Bank Account Numbers in a PDF

Apply pattern-based rules to remove account numbers and other financial identifiers, then verify the export before distributing.

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
Identify how account numbers appear (full number, masked, grouped, with labels).
See Example: Labeled account number
Regex
(?i)account\s*(?:number|no\.?|#)\s*[:\-]?\s*\d{6,17}
Matches
  • Account number: 1234567890
  • Acct # 000123456789
Start with a labeled pattern to reduce false positives. Then add more specific rules if needed.
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 2
Create targeted regex rules for the number formats you see (avoid overly-broad patterns).
Step 3
Preview matches and confirm you are not redacting unrelated numeric fields.
Step 4
Export a final PDF (text-preserving or image-only) with permanent removal.
Step 5
Verify using search/copy in the exported PDF and review the verification report.

Common mistakes to avoid

Over-broad numeric regex
Avoid “match any long number” patterns. Constrain by labels, spacing, or known formats.
Ignoring routing numbers
If routing numbers appear and your policy requires removal, add a specific routing-number rule.

FAQ

Can I keep only the last 4 digits?
Yes—use rules that capture only the portion you want removed based on your policy.