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:

  1. Weighted Sum: Calculate the weighted sum of the converted characters for DV 1 and DV 2.
  2. Modulo 11: Apply the remainder of the division by 11 to determine the DV.
  3. Check Digit Assignment: If the remainder is 0 or 1, DV = 0. Otherwise, DV = 11 - remainder.

Product Availability Matrix

ProductCaseWebhookAvailable for TestingEstimated Availability
OnboardingAccount Creation✅ Includes✅ AvailableN/A
OnboardingAccount Update✅ Includes✅ AvailableN/A
OnboardingLimit Management✅ Includes✅ AvailableN/A
OnboardingAccount Billing❌ Does Not Include✅ AvailableN/A
OnboardingSignatory Management✅ Includes✅ AvailableN/A
OnboardingAccount Unblocking Request✅ Includes✅ AvailableN/A
PixPix Receipt✅ Includes✅ AvailableN/A
PixPix Payment✅ Includes✅ AvailableN/A
PixPix Key✅ Includes✅ AvailableN/A
PixDevice Management❌ Does Not Include✅ AvailableN/A
PixMED Contestation✅ Includes✅ AvailableN/A
Pix AutomáticoPayer Journey✅ Includes✅ AvailableN/A
Pix AutomáticoReceiver Journey✅ Includes✅ AvailableN/A
PaymentsPayment✅ Includes✅ AvailableN/A
Balances and StatementsBalances and Statements✅ Includes✅ AvailableN/A
Future PostingFuture Posting✅ Includes✅ AvailableN/A
CardsCard Issuance✅ Includes❌ Not Available11/06/2026
CardsAccess Control✅ Includes❌ Not Available11/06/2026
CardsCredit and Transaction Management✅ Includes❌ Not Available11/06/2026
CardsLimit Management✅ Includes❌ Not Available11/06/2026
CardsBenefits Management✅ Includes❌ Not Available11/06/2026
CardsVirtual Card✅ Includes❌ Not Available11/06/2026
Top-UpTop-up Management✅ Includes✅ AvailableN/A
Bank TransferBank Transfer Management✅ Includes✅ AvailableN/A
BoletoCollection Boleto✅ Includes✅ AvailableN/A
DDAAuthorized Direct Debits✅ Includes✅ AvailableN/A
Payment OrderPayment Order Management✅ Includes✅ AvailableN/A
Collection OrderPix Collection Order✅ Includes✅ AvailableN/A
Collection OrderBoleto Collection Order✅ Includes✅ AvailableN/A
Collection OrderHybrid Collection Order✅ Includes✅ AvailableN/A
P2PP2P Management✅ Includes✅ AvailableN/A
SLCCard Settlement Service✅ Includes✅ AvailableN/A
CNABIOCNABIO❌ Does Not Include✅ AvailableN/A
AnythingIOAnythingIO❌ 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:

👉 Alphanumeric CNPJ Test Matrix Spreadsheet