Skip to main content

NF-e / NFC-e / CT-e Access Key Validator

Validate structural authenticity, embedded metadata, and check digit of 44-digit Brazilian DF-e access keys.

About DF-e Access Key Validation

Validation inspects the 44-digit numeric sequence, Brazilian state IBGE code legitimacy, emission date integrity (month/year), and Modulo 11 check digit accuracy.

Access key formatting errors are a primary cause of rejection in tax messaging software, ERPs, and invoicing gateways (SEFAZ rejections 225, 226, 253).

Anatomia & Estrutura da Chave de Acesso (44 Dígitos)

Official structure standardized by the MOC taxpayer manual and CONFAZ/ENCAT SINIEF agreements:

PositionFieldLengthMeaning & SpecificationExample
1 and 2cUF2 digitsIBGE state code of the issuing federation unit35 (SP)
3 to 6AAMM4 digitsYear and month of document issuance2609
7 to 20CNPJ14 digitsFederal taxpayer number of the issuing company00.000.000/0001-55
21 and 22mod2 digitsDocument model (55=NF-e, 65=NFC-e, 57=CT-e)55
23 to 25série3 digitsInvoice series number001
26 to 34nNF9 digitsSequential invoice number000000001
35tpEmis1 digitEmission mode (1=Normal, 2 to 9=Contingency)1
36 to 43cNF8 digitsRandom numerical security code00000001
44cDV1 digitCheck digit calculated via Modulo 11 (weights 2..9)5

Check Digit Verification Algorithm (Modulo 11)

Official calculation performed by Brazilian SEFAZ tax authorities on the first 43 digits:

S = Σ(d_i * weight_i) | DV = rem < 2 ? 0 : 11 - rem
  1. 1. Iterate from position 43 down to 1 (from right to left).
  2. 2. Multiply each digit by the repeating weight sequence [2, 3, 4, 5, 6, 7, 8, 9, 2, 3...].
  3. 3. Sum all products and calculate the remainder modulo 11 (Sum % 11).
  4. 4. If remainder is 0 or 1, check digit cDV is 0.
  5. 5. If remainder is between 2 and 10, cDV is 11 - remainder.

Frequently Asked Questions & Technical Specifications