What is Masking?
Masking is a privacy protection method that partially hides sensitive data by replacing most characters with a masking character (typically*), while keeping a few characters visible for identification purposes.
Example:
How It Works
- Detection: Blindfold identifies sensitive entities in your text
- Partial Replacement: Most characters are replaced with masking characters
- Selective Visibility: A configurable number of characters remain visible
- Direction Control: Choose to show characters from the beginning or end
When to Use Masking
Masking is ideal when you need to:1. Display Payment Information
Show payment methods in user interfaces without exposing full details.- Users can identify their card (last 4 digits)
- Full card number stays protected
- PCI-DSS compliant display
2. Show Partial Email Addresses
Display enough to identify the account without exposing the full email.- Account recovery confirmation
- Security notifications
- Multi-account selection
3. Protect Phone Numbers
Show country code or last digits for verification.4. Display User Information in Admin Panels
Allow admins to identify users without seeing full sensitive data.When NOT to Use Masking
Masking is not suitable when:1. You Need to Restore Original Data
Masking is irreversible. Use Tokenization instead.2. You Need Complete Removal
If no part should be visible, use Redaction.3. Data is for Processing (Not Display)
For data processing by systems, use Tokenization or Redaction.Key Features
Configurable Visibility
Choose how many characters to show (1-10+)
Direction Control
Show characters from start or end
Custom Mask Character
Use *, X, #, or any character
Multiple Entity Types
Works with emails, cards, SSNs, phones, etc.
Quick Start
- Python
- JavaScript
- cURL
Configuration Options
Masking Character
Choose which character to use for masking:Characters to Show
Control how many characters remain visible:Direction
Choose to show characters from the start or end:Filter Entity Types
Only mask specific types of data:Common Patterns
Payment Card Display
Standard pattern for showing payment cards:Email Display
Show beginning of email for identification:Phone Number Display
Show last 2 or 4 digits:Common Use Cases
E-commerce Payment Display
E-commerce Payment Display
Show saved payment methods to customers:Benefits: Users can identify their cards, PCI compliance maintained
Account Recovery
Account Recovery
Confirm user identity by showing partial email:Benefits: User knows which account, email address not exposed
Admin Dashboards
Admin Dashboards
Show user information to admins without full PII:Benefits: Admins can identify users, reduced PII exposure
Security Notifications
Security Notifications
Notify users about security events without exposing full details:Benefits: User can verify it’s their number, privacy maintained
Best Practices
1. Follow Industry Standards
Use established patterns for different data types:2. Balance Security and Usability
Show enough for identification, not more:3. Use Consistent Masking
Be consistent across your application:4. Document Your Masking Rules
Make it clear what’s shown and what’s hidden:Security Considerations
Learn More
Python SDK
Full Python SDK documentation
JavaScript SDK
Complete JavaScript guide
REST API
HTTP API reference for /mask
Examples
Practical integration examples