webfilteringdatabase.com
Home Find Your Solution
Features
Domain Categorization API Real-Time Classification 59 Filtering Categories Offline Database (100M) ML Classification Content Classification
Industries
K-12 Schools Corporate Healthcare Government ISPs
Tools
Domain Lookup Bulk Categorization Category Explorer
Resources
Pricing API Documentation Login / Sign Up
How-To Guide

How to Redact Bank Account Information

Learn how to comprehensively redact all bank account information including routing numbers, SWIFT/BIC codes, sort codes, and bank names. Protect complete banking data in payment instructions, wire transfers, and financial documents.

12 min read
Code examples included
Updated Jan 2025
In This Guide
Overview

Every banking identifier, protected in one pass

Complete bank account information encompasses multiple data elements that, when combined, enable financial transactions. This includes account numbers, routing numbers (ABA/ACH), SWIFT/BIC codes, sort codes, bank names, and branch identifiers.

Unified Detection

Anonymization API provides unified detection and redaction for all banking identifiers with 99.4% accuracy. Our system understands the relationships between banking data elements and can detect complete wire transfer instructions, ACH payment details, and international banking information in various formats and languages.

Any Financial Document

Whether you're processing payment documents, vendor setup forms, direct deposit authorizations, or international wire instructions, our API ensures that all banking information is consistently identified and redacted.

Protecting this information comprehensively is essential, as even partial banking data can facilitate fraud when combined with other pieces.

We support both US domestic banking formats and international standards including IBAN, SWIFT, and regional identifiers from 80+ countries.

Before Anonymization
Wire Instructions: Bank: Chase Bank NA Routing: 021000021 Account: 123456789012 SWIFT: CHASUS33
After Anonymization
Wire Instructions: Bank: [BANK_NAME] Routing: [ROUTING_NUMBER] Account: [BANK_ACCOUNT] SWIFT: [SWIFT_CODE]

Complete Detection

All banking data types in one pass

International Support

80+ countries and banking systems

Relationship Aware

Understands linked banking elements

The Stakes

Why Redact Bank Account Information

Complete banking information represents the keys to financial accounts. Unlike credit cards with robust fraud protections, direct access to bank account details can enable immediate, unauthorized ACH debits, wire transfers, and other irreversible financial transactions.

High Risk: Routing number + account number = complete ACH access. Wire transfer fraud using compromised banking details is difficult to reverse and can result in total loss of funds. Comprehensive redaction of ALL banking elements is essential. The combination of routing and account numbers is particularly dangerous.

Regulatory Compliance Requirements

Banking information protection is mandated by numerous regulations:

What Constitutes Bank Account Information

Complete banking data includes multiple interconnected elements:

Account Numbers

The unique identifier for the specific account (checking, savings, etc.)

Routing Numbers (ABA)

9-digit codes identifying the financial institution for US domestic transfers

SWIFT/BIC Codes

8-11 character codes for international bank identification

IBANs

International Bank Account Numbers combining country, check digits, and account info

Sort Codes

UK bank branch identifiers (6 digits)

BSB Numbers

Australian Bank-State-Branch numbers

Bank Names

Institution names when combined with other banking data

Branch Information

Branch addresses and identifiers

Important: Individual banking elements may seem harmless alone, but become highly sensitive when combined. Our API understands these relationships and can redact banking information comprehensively based on context.

Quick Start

Redact banking data in a few lines of code

Get started with comprehensive bank information redaction in just a few lines of code. This example shows how to detect and redact all banking elements from text.

from anonymization import Client

client = Client(api_key="your_api_key")

result = client.anonymize(
    text="Bank: Wells Fargo, Routing: 121000248, Account: 7890123456",
    entity_types=["BANK_INFO"]  # Detects all banking elements
)

print(result.anonymized_text)
# Output: Bank: [BANK_NAME], Routing: [ROUTING_NUMBER], Account: [BANK_ACCOUNT]
const { AnonymizationClient } = require('@anonymization/api');

const client = new AnonymizationClient('your_api_key');

const result = await client.anonymize({
    text: "Bank: Wells Fargo, Routing: 121000248, Account: 7890123456",
    entityTypes: ["BANK_INFO"]
});

console.log(result.anonymizedText);
// Output: Bank: [BANK_NAME], Routing: [ROUTING_NUMBER], Account: [BANK_ACCOUNT]
curl -X POST https://api.anonymizationapi.com/v2/anonymize \
  -H "Authorization: Bearer your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Bank: Wells Fargo, Routing: 121000248, Account: 7890123456",
    "entity_types": ["BANK_INFO"]
  }'

The API response includes all detected banking elements with their types:

{
  "anonymized_text": "Bank: [BANK_NAME], Routing: [ROUTING_NUMBER], Account: [BANK_ACCOUNT]",
  "entities": [
    {
      "type": "BANK_NAME",
      "text": "Wells Fargo",
      "start": 6,
      "end": 17,
      "confidence": 0.98
    },
    {
      "type": "ROUTING_NUMBER",
      "text": "121000248",
      "start": 28,
      "end": 37,
      "confidence": 0.99,
      "metadata": {
        "checksum_valid": true,
        "bank_name": "Wells Fargo Bank, NA"
      }
    },
    {
      "type": "BANK_ACCOUNT",
      "text": "7890123456",
      "start": 48,
      "end": 58,
      "confidence": 0.97
    }
  ]
}
Bank Data Types

Bank Data Types

Our API recognizes and categorizes different types of banking information for precise redaction.

Routing Numbers (ABA/ACH)

US routing numbers are 9 digits with a built-in checksum:

Routing Number Formats
021000021 (JPMorgan Chase) 121000248 (Wells Fargo) 011401533 (Bank of America) Routing/ABA: 021000021 ABA#: 121000248

SWIFT/BIC Codes

International bank identifiers are 8 or 11 characters:

SWIFT Code Formats
CHASUS33 (Chase - 8 char) CHASUS33XXX (Chase with branch - 11 char) BOFAUS3N (Bank of America) WFBIUS6S (Wells Fargo) DEUTDEFF (Deutsche Bank, Germany)

Sort Codes (UK)

UK bank/branch identifiers are 6 digits, often formatted with dashes:

UK Sort Code Formats
12-34-56 123456 Sort Code: 20-00-00 (Barclays)

Complete Wire Instructions

The API detects complete wire transfer instruction blocks:

Wire Instruction Example
Beneficiary Bank: Citibank N.A. SWIFT: CITIUS33 ABA: 021000089 Account Name: ABC Corporation Account Number: 123456789012 Reference: Invoice #2025-001
Redacted
Beneficiary Bank: [BANK_NAME] SWIFT: [SWIFT_CODE] ABA: [ROUTING_NUMBER] Account Name: [ORGANIZATION] Account Number: [BANK_ACCOUNT] Reference: Invoice #2025-001
# Detect all banking data types at once
result = client.anonymize(text, entity_types=["BANK_INFO"])

# Or specify individual types for granular control
result = client.anonymize(text, entity_types=[
    "BANK_ACCOUNT",      # Account numbers
    "ROUTING_NUMBER",    # ABA routing numbers
    "SWIFT_BIC",         # SWIFT/BIC codes
    "IBAN",              # International IBANs
    "SORT_CODE",         # UK sort codes
    "BSB",               # Australian BSB
    "BANK_NAME"          # Bank institution names
])

# Enable routing number validation
result = client.anonymize(
    text=text,
    entity_types=["ROUTING_NUMBER"],
    options={"routing_validate": True}
)
Coverage At A Glance

One entity family, complete banking coverage

99.4% Detection accuracy across banking identifiers
80+ Countries and banking systems supported
97% Bank name accuracy in banking contexts
7 Entity types covered by BANK_INFO
Techniques

Anonymization Techniques

Choose the appropriate technique based on your security requirements and downstream data needs.

1

Full Redaction (Default)

Completely replaces all banking elements with type-specific placeholders. Maximum security.

Routing: 021000021, Account: 123456789012
Routing: [ROUTING_NUMBER], Account: [BANK_ACCOUNT]
2

Unified Redaction

Replaces all banking elements with a single placeholder. Useful when you don't need to preserve structure.

Routing: 021000021, Account: 123456789012
[BANK_INFORMATION]
3

Partial Masking

Shows last few digits for verification while hiding sensitive parts.

Routing: 021000021, Account: 123456789012
Routing: ******021, Account: ********9012
4

Institution-Only Preservation

Redacts account-specific data while keeping general bank identification.

Bank: Chase, Routing: 021000021, Account: 123456789012
Bank: Chase, Routing: [ROUTING], Account: [ACCOUNT]
5

Format-Preserving Pseudonymization

Replaces with fake but valid-format banking data. Useful for testing systems.

Routing: 021000021, Account: 123456789012
Routing: 121042882, Account: 987654321098
# Full redaction with type-specific placeholders (default)
result = client.anonymize(text, entity_types=["BANK_INFO"], mode="redact")

# Unified redaction - single placeholder for all banking data
result = client.anonymize(text, entity_types=["BANK_INFO"], mode="redact",
    options={"unified_placeholder": "BANK_INFORMATION"})

# Partial masking - show last 4 characters
result = client.anonymize(text, entity_types=["BANK_INFO"], mode="mask",
    options={"show_last": 4})

# Keep bank names, redact numbers
result = client.anonymize(text,
    entity_types=["BANK_ACCOUNT", "ROUTING_NUMBER", "SWIFT_BIC"])
# Bank names will be preserved

# Format-preserving pseudonymization
result = client.anonymize(text, entity_types=["BANK_INFO"], mode="pseudonymize",
    options={"valid_format": True})
Code Examples

Code Examples

Processing Wire Transfer Instructions

Redact complete wire instruction documents:

wire_instructions = """
DOMESTIC WIRE INSTRUCTIONS
--------------------------
Bank Name: JPMorgan Chase Bank, N.A.
Bank Address: 270 Park Avenue, New York, NY 10017
ABA/Routing Number: 021000021
Account Number: 123456789012
Account Name: ACME Corporation
Reference: Contract #2025-100

INTERNATIONAL WIRE (USD)
------------------------
SWIFT Code: CHASUS33
Bank Name: JPMorgan Chase Bank, N.A.
Account Number: 123456789012
"""

result = client.anonymize(
    text=wire_instructions,
    entity_types=["BANK_INFO", "ADDRESS", "ORGANIZATION"]
)

print(result.anonymized_text)

Batch Processing Vendor Records

Process multiple vendor banking records:

vendor_records = [
    "Vendor A: Bank of America, ABA 011401533, Acct 1234567890",
    "Vendor B: Wells Fargo, Routing 121000248, Account 0987654321",
    "Vendor C: HSBC UK, Sort 40-05-30, Acct 12345678",
    "Vendor D: Deutsche Bank, IBAN DE89370400440532013000"
]

results = client.batch_anonymize(
    items=[{"text": record} for record in vendor_records],
    entity_types=["BANK_INFO"]
)

for r in results:
    print(r.anonymized_text)

Direct Deposit Authorization Forms

Process employee direct deposit information:

direct_deposit_form = """
DIRECT DEPOSIT AUTHORIZATION
Employee Name: John Smith
Employee ID: EMP-12345

Bank Information:
Bank Name: US Bank
Routing Number: 091000019
Account Number: 1234567890
Account Type: Checking

I authorize my employer to deposit my pay directly to the above account.

Signature: John Smith
Date: January 15, 2025
"""

result = client.anonymize(
    text=direct_deposit_form,
    entity_types=[
        "PERSON",
        "BANK_INFO",
        "DATE"
    ]
)

print(result.anonymized_text)

Detecting Banking Data in Documents

Scan documents for any banking information:

def audit_for_banking_data(document_text, document_id):
    """Scan document for any banking information"""

    result = client.detect(
        text=document_text,
        entity_types=["BANK_INFO"]
    )

    if result.entities:
        print(f"ALERT: Document {document_id} contains banking data:")
        for entity in result.entities:
            print(f"  - {entity.type}: '{entity.text[:20]}...' at position {entity.start}")

        # Return redacted version
        redacted = client.anonymize(
            text=document_text,
            entity_types=["BANK_INFO"]
        )
        return redacted.anonymized_text

    return document_text  # No banking data found
Best Practices

Best Practices

1

Use Comprehensive Detection

Always use the umbrella BANK_INFO type to catch all banking elements:

# Recommended: Use BANK_INFO for comprehensive coverage
result = client.anonymize(
    text=text,
    entity_types=["BANK_INFO"]  # Catches all banking data types
)

# BANK_INFO includes:
# - BANK_ACCOUNT
# - ROUTING_NUMBER
# - SWIFT_BIC
# - IBAN
# - SORT_CODE
# - BSB
# - BANK_NAME (in banking contexts)
2

Validate Checksums for Accuracy

Enable checksum validation to reduce false positives:

# Enable all available validations
result = client.anonymize(
    text=text,
    entity_types=["BANK_INFO"],
    options={
        "routing_validate": True,   # ABA checksum
        "iban_validate": True,      # IBAN checksum
        "swift_validate": True      # SWIFT format
    }
)
3

Handle International Formats

Specify expected countries for better detection of regional formats:

# For international documents, specify expected countries
result = client.anonymize(
    text=international_doc,
    entity_types=["BANK_INFO"],
    options={
        "bank_countries": ["US", "GB", "DE", "FR"]
    }
)
4

Combine with Related PII

Banking data often appears with names and addresses - redact together:

# Comprehensive financial document redaction
result = client.anonymize(
    text=financial_doc,
    entity_types=[
        "BANK_INFO",       # All banking data
        "PERSON",          # Account holder names
        "ORGANIZATION",    # Company names
        "ADDRESS",         # Bank/account holder addresses
        "SSN",             # Tax IDs that may appear
        "PHONE"            # Contact numbers
    ]
)
5

Implement at Multiple Layers

Defense in depth for banking data protection:

  • Input Layer: Redact banking data before storing in databases
  • Log Layer: Filter logs to prevent accidental banking data logging
  • Output Layer: Redact before displaying or exporting
  • Email/Communication: Scan outgoing communications
  • Backup Layer: Ensure backups contain only redacted data

Security Note: Banking information should never be displayed in full in any user interface, log file, or report. Always apply masking showing at most the last 4 characters for verification purposes.

FAQ

Frequently Asked Questions

What's the difference between BANK_INFO and individual types?

BANK_INFO is an umbrella entity type that detects all banking-related information in one pass. Using individual types (BANK_ACCOUNT, ROUTING_NUMBER, etc.) gives you granular control over what to redact, but BANK_INFO is recommended for comprehensive protection.

How accurate is bank name detection?

Bank names are detected with 97% accuracy when they appear in banking contexts (near account numbers, routing numbers, or wire instructions). Standalone mentions of bank names may have lower confidence as they could be references rather than account information.

Can I detect banking data in images?

The API processes text. For checks, bank statements, or scanned documents, use OCR first to extract text. We can recommend OCR partners. The MICR line on checks has a specific format that our API recognizes after OCR extraction.

How do I handle wire instructions in multiple languages?

The API supports banking terminology in multiple languages. Common terms like "IBAN", "SWIFT", "compte bancaire" (French), "Kontonummer" (German) are recognized. Specify the language for better accuracy: options={"language": "de"}.

What about cryptocurrency wallet addresses?

Cryptocurrency addresses (Bitcoin, Ethereum, etc.) are handled by a separate entity type: CRYPTO_ADDRESS. Add this to your entity_types array to detect and redact crypto wallets alongside traditional banking information.

How do I validate if a routing number is real?

Enable routing validation with options={"routing_validate": True}. The API validates the ABA checksum and can optionally verify against the Federal Reserve routing directory. Invalid routing numbers are flagged with lower confidence.

Can I keep the bank name but redact account numbers?

Yes, simply exclude BANK_NAME from your entity_types: entity_types=["BANK_ACCOUNT", "ROUTING_NUMBER", "SWIFT_BIC"]. Bank names will remain while other banking data is redacted.

Keep Reading

Related Guides

Start Redacting Bank Information Today

Protect complete banking data with comprehensive detection. Support for routing numbers, SWIFT codes, and 80+ countries.