Achieve LGPD compliance with automated detection of Brazilian PII. Protect CPF, CNPJ, RG, and other identifiers with native Portuguese language support.
Complete Brazilian PII protection
Detect and validate Cadastro de Pessoas Físicas (CPF) numbers with checksum verification.
Recognize Cadastro Nacional da Pessoa Jurídica corporate identifiers.
Detect state-specific Registro Geral identity document numbers.
Recognize Brazilian naming patterns including compound surnames.
Parse CEP postal codes and Brazilian address formats.
Full support for Lei Geral de Proteção de Dados requirements.
Simple integration, powerful results
Send your documents, text, or files through our secure API endpoint or web interface.
Our AI analyzes content to identify all sensitive information types with 99.7% accuracy.
Sensitive data is automatically redacted based on your configured compliance rules.
Receive your redacted content with full audit trail and compliance documentation.
Get started with just a few lines of code
import requests
api_key = "your_api_key"
url = "https://api.redactionapi.net/v1/redact"
data = {
"text": "John Smith's SSN is 123-45-6789",
"redaction_types": ["ssn", "person_name"],
"output_format": "redacted"
}
response = requests.post(url,
headers={"Authorization": f"Bearer {api_key}"},
json=data
)
print(response.json())
# Output: {"redacted_text": "[PERSON_NAME]'s SSN is [SSN_REDACTED]"}
const axios = require('axios');
const apiKey = 'your_api_key';
const url = 'https://api.redactionapi.net/v1/redact';
const data = {
text: "John Smith's SSN is 123-45-6789",
redaction_types: ["ssn", "person_name"],
output_format: "redacted"
};
axios.post(url, data, {
headers: { 'Authorization': `Bearer ${apiKey}` }
})
.then(response => {
console.log(response.data);
// Output: {"redacted_text": "[PERSON_NAME]'s SSN is [SSN_REDACTED]"}
});
curl -X POST https://api.redactionapi.net/v1/redact \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: application/json" \
-d '{
"text": "John Smith's SSN is 123-45-6789",
"redaction_types": ["ssn", "person_name"],
"output_format": "redacted"
}'
# Response:
# {"redacted_text": "[PERSON_NAME]'s SSN is [SSN_REDACTED]"}
Brazil's Lei Geral de Proteção de Dados (LGPD) has transformed data privacy requirements for organizations operating in Latin America's largest economy. With over 215 million people and a highly digital population, Brazilian personal data flows through countless business processes—from financial services requiring CPF verification to healthcare records, employment documents, and e-commerce transactions. Organizations must protect this data while navigating LGPD's comprehensive requirements for consent, data subject rights, and security measures.
Our Brazil-specific redaction capabilities combine regulatory expertise with native Portuguese language processing. We detect and validate Brazilian identifiers like CPF and CNPJ using official algorithms, recognize Brazilian naming patterns and address formats, and support the full range of personal data categories defined by LGPD. This enables organizations to protect Brazilian personal data systematically while maintaining the business utility of their documents and datasets.
LGPD establishes comprehensive data protection requirements:
Personal Data (Dados Pessoais):
Sensitive Personal Data (Dados Pessoais Sensíveis):
Key LGPD Principles:
The Cadastro de Pessoas Físicas is Brazil's primary individual identifier:
CPF Format:
Format: XXX.XXX.XXX-XX (11 digits)
Example: 123.456.789-09
Structure:
- First 9 digits: Base number
- Last 2 digits: Verification digits
Validation algorithm:
First check digit:
Sum = d1×10 + d2×9 + d3×8 + d4×7 + d5×6 + d6×5 + d7×4 + d8×3 + d9×2
Remainder = Sum mod 11
Check1 = 11 - Remainder (if ≤ 1, Check1 = 0)
Second check digit:
Sum = d1×11 + d2×10 + d3×9 + d4×8 + d5×7 + d6×6 + d7×5 + d8×4 + d9×3 + Check1×2
Remainder = Sum mod 11
Check2 = 11 - Remainder (if ≤ 1, Check2 = 0)
Example validation:
CPF: 529.982.247-25
- Check digit 1 calculation → 2 ✓
- Check digit 2 calculation → 5 ✓
- Valid CPF
Detection Patterns:
// With formatting
123.456.789-09
// Without formatting
12345678909
// Variations
CPF: 123.456.789-09
CPF nº 12345678909
Cadastro: 123.456.789-09
Corporate identifier for Brazilian legal entities:
CNPJ Format:
Format: XX.XXX.XXX/YYYY-ZZ (14 digits)
Example: 11.222.333/0001-81
Structure:
- First 8 digits: Base registration number
- /YYYY: Branch identifier (0001 for headquarters)
- -ZZ: Verification digits
Validation algorithm (similar to CPF):
First check digit:
Weights: [5,4,3,2,9,8,7,6,5,4,3,2]
Sum = Σ(digit × weight)
Remainder = Sum mod 11
Check1 = 11 - Remainder (if < 2, Check1 = 0)
Second check digit:
Weights: [6,5,4,3,2,9,8,7,6,5,4,3,2]
Including first check digit
Same calculation
Detection Patterns:
// With formatting
11.222.333/0001-81
// Without formatting
11222333000181
// Variations
CNPJ: 11.222.333/0001-81
CNPJ nº 11222333000181
State-issued general registry identification:
RG Characteristics:
// Format varies by issuing state
// Common patterns:
São Paulo (SSP-SP):
XX.XXX.XXX-X or XXXXXXXXX
Example: 12.345.678-9
Rio de Janeiro (DETRAN-RJ):
XX.XXX.XXX-X
Example: 11.222.333-4
Minas Gerais (SSP-MG):
MG-XX.XXX.XXX
Example: MG-12.345.678
// Contextual detection
RG: 12.345.678-9
Identidade: 123456789
Registro Geral nº 12345678-9
RG/SSP-SP: 12.345.678-9
Brazilian naming conventions for detection:
Name Structure:
// Brazilian names typically include:
- Given name(s): João Pedro
- Mother's family name(s): Silva
- Father's family name(s): Santos
// Full name example:
João Pedro Silva Santos
Maria Eduarda Oliveira Costa
// Common patterns:
- Multiple given names common
- Multiple surnames (maternal + paternal)
- Compound surnames (without hyphen usually)
- Religious or indigenous names
// Top surnames:
Silva, Santos, Oliveira, Souza, Lima
Pereira, Costa, Ferreira, Rodrigues, Almeida
Name Detection:
// Detection considers:
- Common Brazilian first names database
- Common Brazilian surname database
- Compound name patterns
- Context indicators (Sr., Sra., Dr., nome:)
Address format and postal code detection:
Address Structure:
// Standard format:
Rua [Street Name], [Number] - [Complement]
[Neighborhood]
[City] - [State]
CEP: [Postal Code]
// Example:
Rua das Flores, 123 - Apto 45
Jardim Paulista
São Paulo - SP
CEP: 01310-100
// Components:
- Logradouro: Rua, Avenida, Alameda, Travessa, etc.
- Número: Building number
- Complemento: Apartment, suite, floor
- Bairro: Neighborhood
- Cidade: City
- Estado: State (2-letter abbreviation)
- CEP: 8-digit postal code (XXXXX-XXX)
CEP Postal Code:
Format: XXXXX-XXX (8 digits)
Example: 01310-100
Structure:
- First 5 digits: Region + subregion
- Last 3 digits: Specific location
Detection patterns:
CEP: 01310-100
CEP 01310100
Código Postal: 01310-100
Phone number formats in Brazil:
// Mobile phones (9 digits, starting with 9)
(11) 99999-9999 // São Paulo mobile
+55 11 99999-9999 // With country code
// Landlines (8 digits)
(11) 3333-4444 // São Paulo landline
+55 21 2222-3333 // Rio de Janeiro
// Format variations:
(XX) XXXXX-XXXX // Mobile with area code
(XX) XXXX-XXXX // Landline with area code
55 11 999999999 // Without formatting
+55 (11) 99999-9999 // Full international
// Area codes (DDD):
11 - São Paulo
21 - Rio de Janeiro
31 - Belo Horizonte
41 - Curitiba
51 - Porto Alegre
// ... 67 area codes total
Brazilian financial documents contain specific identifiers:
Bank Account Information:
// Brazilian bank account format:
Banco: [Bank Code]
Agência: [Branch Number]-[Check Digit]
Conta: [Account Number]-[Check Digit]
// Example:
Banco: 001 (Banco do Brasil)
Agência: 1234-5
Conta: 123456-7
// Major bank codes:
001 - Banco do Brasil
033 - Santander
104 - Caixa Econômica
237 - Bradesco
341 - Itaú
PIS/PASEP/NIT:
// Social Integration Program number
Format: XXX.XXXXX.XX-X (11 digits)
Example: 123.45678.90-1
// Used for:
- Employment records
- FGTS (employment fund)
- Social security
Brazilian healthcare document identifiers:
// Cartão SUS (Cartão Nacional de Saúde)
Format: XXX XXXX XXXX XXXX (15 digits)
Example: 123 4567 8901 2345
// CRM (Medical License)
CRM/[State] [Number]
Example: CRM/SP 123456
// Health insurance (Plano de Saúde)
Various formats per provider
Regulatory requirements affecting redaction:
Data Subject Rights:
Anonymization Standard:
Cross-Border Transfer:
Brazilian sector regulations complement LGPD:
Financial Services (Banco Central):
Healthcare (ANS/ANVISA):
Telecommunications (ANATEL):
POST /v1/redact
{
"text": "Cliente: João Silva, CPF: 529.982.247-25, Tel: (11) 99999-8888",
"country": "BR",
"redaction_types": ["cpf", "cnpj", "rg", "name", "phone", "address"],
"options": {
"validate_checksums": true,
"language": "pt-BR"
}
}
Response:
{
"redacted_text": "Cliente: [NAME], CPF: [CPF], Tel: [PHONE]",
"detections": [
{
"type": "name",
"value": "João Silva",
"confidence": 0.95
},
{
"type": "cpf",
"value": "529.982.247-25",
"valid_checksum": true,
"confidence": 0.99
},
{
"type": "phone",
"value": "(11) 99999-8888",
"format": "mobile",
"confidence": 0.98
}
],
"compliance": ["LGPD"]
}
RedactionAPI has transformed our document processing workflow. We've reduced manual redaction time by 95% while achieving better accuracy than our previous manual process.
The API integration was seamless. Within a week, we had automated redaction running across all our customer support channels, ensuring GDPR compliance effortlessly.
We process over 50,000 legal documents monthly. RedactionAPI handles it all with incredible accuracy and speed. It's become an essential part of our legal tech stack.
The multi-language support is outstanding. We operate in 30 countries and RedactionAPI handles all our documents regardless of language with consistent accuracy.
Trusted by 500+ enterprises worldwide





The Lei Geral de Proteção de Dados (LGPD) is Brazil's comprehensive data protection law, effective since 2020. Similar to GDPR, it regulates collection, processing, and storage of personal data, with significant fines for non-compliance (up to 2% of revenue or R$50 million per violation).
CPF (Cadastro de Pessoas Físicas) is Brazil's individual taxpayer identification number. It's an 11-digit number with two check digits, required for virtually all financial and official transactions. We validate CPF numbers using the standard checksum algorithm.
CPF and CNPJ numbers include check digits that we validate mathematically. RG numbers vary by state and don't have universal validation, so we use pattern matching and contextual analysis. All identifiers are verified against format specifications.
Yes, we have full Portuguese language NLP support for Brazilian Portuguese. This includes Brazilian naming conventions (compound surnames like Silva Santos), address patterns, and Portuguese-specific PII terminology in documents.
Brazilian CEP codes (8 digits, formatted as XXXXX-XXX) are detected and can be redacted or used as context indicators for addresses. CEP codes often appear alongside full addresses in documents.
RG (Registro Geral) is issued by each Brazilian state with different formats. SSP-SP (São Paulo) uses one format, while other states vary. We detect RG patterns from all states and use context (like "RG:" labels) for accurate identification.