Home / Validate VAT / Brazil
Validate Brazil Tax ID Numbers via API
When building B2B applications that serve Brazil (Brasil), validating your customers' CNPJ (Cadastro Nacional da Pessoa Jurídica) is essential for B2B compliance and protecting your business from tax liability.
The TaxID API provides instant format validation and live lookup for Brazil CNPJ numbers via RFB (Receita Federal do Brasil). Every request returns the validation status with sub-100ms response times for cached results.Brazil applies a standard rate of 17% (CNPJ).
QUICK START
curl -H "Authorization: Bearer YOUR_API_KEY" \ http://localhost:3000/api/v1/validate/BR/11222333000181
Code examples
Choose your language. Every example validates a Brazil VAT number and returns the registration status with company details.
const res = await fetch('http://localhost:3000/api/v1/validate/BR/11222333000181', {
headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
});
const data = await res.json();
// { valid: true, status: "active", company_name: "...", country_code: "BR", cached: false }
console.log(data);When to validate Brazil tax ID numbers
B2B invoicing and accounts payable
When issuing or receiving invoices from Brazil businesses, validating the CNPJ (Cadastro Nacional da Pessoa Jurídica) ensures the identifier is genuine before committing the transaction to your ERP. Invalid or fabricated tax IDs are a leading vector for invoice fraud and can result in rejected filings or audit penalties.
SaaS and e-commerce checkout
If your platform serves Brazil business customers, collecting and validating their CNPJ (Cadastro Nacional da Pessoa Jurídica) at checkout is required for accurate tax treatment, correct invoicing, and downstream reporting. An invalid tax ID at the point of sale creates a correction burden across your finance stack.
Supplier and marketplace onboarding
For procurement platforms and regulated marketplaces onboarding Brazil sellers or vendors, validating the CNPJ (Cadastro Nacional da Pessoa Jurídica) at registration prevents fraudulent or duplicate accounts from entering your ecosystem. Validate once at onboarding, then re-validate periodically to detect deregistrations or changes.
About Brazil VAT format (CNPJ)
Brazil has one of the world's most complex tax systems with multiple overlapping taxes (ICMS, ISS, PIS, COFINS). CNPJ is the primary company tax identifier, 14 digits with two check digits using modulo 11. Brazil is the largest economy in Latin America and a major B2B SaaS market.
| Field | Value |
|---|---|
| Country code | BR |
| Local name | CNPJ (Cadastro Nacional da Pessoa Jurídica) |
| Format | 14 digits (often displayed as XX.XXX.XXX/XXXX-XX) |
| Regex pattern | ^[0-9]{14}$ |
| Example | 11222333000181 |
| VIES supported | No |
VAT rates in Brazil
Brazil applies a standard CNPJ rate of 17%. Reduced rates of 12% and 7% apply to essential goods and services.
| Rate type | Percentage | Currency |
|---|---|---|
| Standard rate | 17% | BRL |
| Reduced rate | 12% | BRL |
| Reduced rate | 7% | BRL |
Frequently asked questions
What is the Brazil tax ID number format?
Brazil tax ID numbers (CNPJ (Cadastro Nacional da Pessoa Jurídica)) follow the format: 14 digits (often displayed as XX.XXX.XXX/XXXX-XX). A valid example is 11222333000181. The TaxID API validates the format locally and where possible checks against the RFB (Receita Federal do Brasil), ensuring you only accept properly registered businesses.
Should I validate CNPJ numbers when transacting with Brazil businesses?
Validating CNPJ numbers reduces fraud risk, prevents invalid identifiers from entering your accounting system, and is required by many B2B contracts and procurement platforms. While mandatory rules vary by jurisdiction, validating at onboarding is widely considered best practice — especially for SaaS, marketplace, and fintech platforms with global customer bases.
What is the standard tax rate in Brazil?
The standard tax rate in Brazil is 17% (CNPJ). Reduced rates of 12% and 7% apply to certain goods and services such as food, books, and medical supplies. The TaxID API's /rates endpoint returns all current rates for programmatic access.
How long does Brazil tax ID validation take with TaxID?
For cached results (previously validated in the last 24 hours), the TaxID API responds in under 10ms. Format validation is instantaneous. For uncached requests requiring a live lookup against RFB (Receita Federal do Brasil), response time is typically 100–500ms. Valid numbers are cached for 24 hours; invalid numbers are cached for 1 hour.
How does the TaxID API validate Brazil CNPJ numbers?
The TaxID API validates Brazil CNPJ numbers in two steps: first it checks the format against the official pattern (14 digits (often displayed as XX.XXX.XXX/XXXX-XX)), then it queries RFB (Receita Federal do Brasil) where a live API is available. Brazil has one of the world's most complex tax systems with multiple overlapping taxes (ICMS, ISS, PIS, COFINS). CNPJ is the primary company tax identifier, 14 digits with two check digits using modulo 11. Brazil is the largest economy in Latin America and a major B2B SaaS market.
Start validating Brazil VAT numbers
Free plan includes 100 validations/month. No credit card required.
Get free API keyDeveloper resources:
Also validate VAT in:
Concepts explained: