Alphanumeric CNPJ
Documentation on the new alphanumeric CNPJ format, per RFB Normative Instruction 2,229/2024.
Change Overview
To mitigate the exhaustion of strictly numeric combinations, the Federal Revenue Service of Brazil (Receita Federal do Brasil) has altered the composition of the National Registry of Legal Entities (CNPJ).
- Size Maintenance: The total length of the field remains unchanged at exactly 14 characters.
- Alphanumeric Structure: The first 12 characters (comprising the 8-digit root and 4-digit branch/establishment ID) will now accept uppercase letters from A to Z combined with numbers from 0 to 9.
- Check Digits: The last 2 characters (positions 13 and 14) remain strictly numeric.
- Coexistence Rule: Previously issued CNPJs (100% numeric) remain valid and unchanged. The alphanumeric format will only be assigned to new civil registrations.
Technical Specifications
Composition and Value Conversion
The CNPJ continues to have 14 characters: positions 1 to 12 represent the root and branch ID (accepting letters or numbers), followed by 2 numeric check digits (DV).
- The first 12 characters can contain letters (A-Z) and numbers (0-9).
- The last two characters will always be numeric digits (DV).
Important Conversion Rule: For validation calculations, each alphanumeric character must be converted using its ASCII value:
- Numbers (0-9): Retain their original values (0–9).
- Letters (A-Z): Converted to values from 17 to 42 (where A=17, B=18, ..., Z=42).
Validation Algorithm (Modulo 11)
The validation process uses weights from 2 to 9, applied from right to left on the converted alphanumeric base:
- Weighted Sum: Calculate the weighted sum of the converted characters for DV 1 and DV 2.
- Modulo 11: Apply the remainder of the division by 11 to determine the DV.
- Check Digit Assignment: If the remainder is
0or1,DV = 0. Otherwise,DV = 11 - remainder.
Product Availability Matrix
| Product | Case | Webhook | Available for Testing | Estimated Availability |
|---|---|---|---|---|
| Onboarding | Account Creation | ✅ Includes | ✅ Available | N/A |
| Onboarding | Account Update | ✅ Includes | ✅ Available | N/A |
| Onboarding | Limit Management | ✅ Includes | ✅ Available | N/A |
| Onboarding | Account Billing | ❌ Does Not Include | ✅ Available | N/A |
| Onboarding | Signatory Management | ✅ Includes | ✅ Available | N/A |
| Onboarding | Account Unblocking Request | ✅ Includes | ✅ Available | N/A |
| Pix | Pix Receipt | ✅ Includes | ✅ Available | N/A |
| Pix | Pix Payment | ✅ Includes | ✅ Available | N/A |
| Pix | Pix Key | ✅ Includes | ✅ Available | N/A |
| Pix | Device Management | ❌ Does Not Include | ✅ Available | N/A |
| Pix | MED Contestation | ✅ Includes | ✅ Available | N/A |
| Pix Automático | Payer Journey | ✅ Includes | ✅ Available | N/A |
| Pix Automático | Receiver Journey | ✅ Includes | ✅ Available | N/A |
| Payments | Payment | ✅ Includes | ✅ Available | N/A |
| Balances and Statements | Balances and Statements | ✅ Includes | ✅ Available | N/A |
| Future Posting | Future Posting | ✅ Includes | ✅ Available | N/A |
| Cards | Card Issuance | ✅ Includes | ❌ Not Available | 11/06/2026 |
| Cards | Access Control | ✅ Includes | ❌ Not Available | 11/06/2026 |
| Cards | Credit and Transaction Management | ✅ Includes | ❌ Not Available | 11/06/2026 |
| Cards | Limit Management | ✅ Includes | ❌ Not Available | 11/06/2026 |
| Cards | Benefits Management | ✅ Includes | ❌ Not Available | 11/06/2026 |
| Cards | Virtual Card | ✅ Includes | ❌ Not Available | 11/06/2026 |
| Top-Up | Top-up Management | ✅ Includes | ✅ Available | N/A |
| Bank Transfer | Bank Transfer Management | ✅ Includes | ✅ Available | N/A |
| Boleto | Collection Boleto | ✅ Includes | ✅ Available | N/A |
| DDA | Authorized Direct Debits | ✅ Includes | ✅ Available | N/A |
| Payment Order | Payment Order Management | ✅ Includes | ✅ Available | N/A |
| Collection Order | Pix Collection Order | ✅ Includes | ✅ Available | N/A |
| Collection Order | Boleto Collection Order | ✅ Includes | ✅ Available | N/A |
| Collection Order | Hybrid Collection Order | ✅ Includes | ✅ Available | N/A |
| P2P | P2P Management | ✅ Includes | ✅ Available | N/A |
| SLC | Card Settlement Service | ✅ Includes | ✅ Available | N/A |
| CNABIO | CNABIO | ❌ Does Not Include | ✅ Available | N/A |
| AnythingIO | AnythingIO | ❌ Does Not Include | ❌ Not Available | ⌛ In planning |
Error Handling
When an invalid CPF/CNPJ or an incorrect alphanumeric structure is submitted, the API returns an HTTP Status 200 OK, indicating that the request was processed successfully. However, the response body will contain the property "Success": "false", detailing the business logic error.
Error Response Example
{
"Success": "false",
"Message": "ISE0014 - Informações enviadas estão inválidas. Veja a propriedade Validation do json para mais detalhes.",
"Validation": [
{
"Key": "TaxNumber",
"Value": [
"ISE0114 - O CPF/CNPJ é inválido."
]
}
]
}
Note: The
"Validation.Key"property represents the specific field that received the invalid CPF/CNPJ (e.g.,TaxNumber,ReceiverTaxNumber,PayeeTaxNumber).
Test Scenarios & Homologation
To guide your technical validation, we provide a structured spreadsheet containing all test scenarios, covering the new alphanumeric CNPJ formats, legacy coexistence, and expected API responses for both Success and Failure paths.
You can access and download the spreadsheet to track your integration progress, filter by product modules, and log test execution statuses here:
Updated 1 day ago
