Skip to content

NFe Key Generator

Generate valid NFe access keys (44 digits) for software testing and fiscal integration. Correct Modulo 11 check digit. Free tool for developers.

No sign-up 100% free Private

IBGE code of the issuing state. Leave empty for random.

Options
The result will appear here

Was this tool helpful?

Generate NFe Access Key for Testing

Generate valid NFe access keys (Nota Fiscal Eletrônica — Brazilian Electronic Invoice) for testing and development with facilita.tools. Each generated key strictly follows the official 44-digit structure defined by the Brazilian Federal Revenue Service (Receita Federal) and SEFAZ: a 2-digit UF code identifying the issuing state, a 4-digit year and month (AAMM), a 14-digit CNPJ of the issuing company, the fiscal document model (55 for NFe or 65 for NFCe), a 3-digit series number, a 9-digit invoice number, the emission type, an 8-digit random numeric code, and a mathematically valid Modulo 11 check digit calculated with cyclic weights 2 through 9.

This tool is essential for software developers and QA engineers who need realistic test data for ERP systems, tax compliance modules, invoice processing pipelines, and SEFAZ integration testing. Use it to populate staging databases, validate XML parsers that process NFe files, test barcode readers that scan DANFE documents, and verify check digit validation routines in your applications. You can generate keys for all 27 Brazilian states, choose between NFe (model 55) and NFCe (model 65), and produce batches of up to 50 unique keys at once.

All generated keys are algorithmically valid — they pass Modulo 11 verification and contain structurally correct fields — but they represent entirely fictional invoices. These keys do not exist in any SEFAZ database and cannot be used for real fiscal transactions. The CNPJ numbers embedded in each key are randomly generated for testing purposes only. This tool runs 100% client-side in your browser using cryptographic random number generation, ensuring no data is sent to any server. It is completely free, requires no registration, and works on any device.

Frequently Asked Questions

What is this tool for?
This tool generates valid NFe access keys for software testing. The keys follow the official 44-digit structure with a correct Modulo 11 check digit, but represent fictional invoices — they do not exist in SEFAZ and cannot be used for real transactions.
Are the generated keys valid?
Yes, algorithmically. Each key has the correct structure (UF + date + CNPJ + model + series + number + emission type + numeric code) and a valid Modulo 11 check digit. However, they represent fictional invoices and will not pass SEFAZ verification.
What is the structure of an NFe access key?
The 44 digits are: UF code (2) + Year-Month (4) + Issuer CNPJ (14) + Model (2) + Series (3) + Invoice Number (9) + Emission Type (1) + Numeric Code (8) + Check Digit (1). Model 55 = NFe, model 65 = NFCe (consumer).