What a DANFE is, and why you need one
In Brazil, a sales invoice for goods is an NF-e (Nota Fiscal Eletrônica): an XML file signed by the seller and authorized by the state tax office, SEFAZ. The DANFE (Documento Auxiliar da NF-e) is its printed companion. According to the official manual, it travels with the goods, collects the buyer's signature on delivery and helps a buyer who does not issue NF-e record the invoice. If a Brazilian supplier sent you only the XML, this page prints the DANFE from it.
One XML file or a whole folder
Choose the XML file above, several at once, or a ZIP of them. Each invoice appears in a list with its number, series, issuer, issue date, total in reais and status. Download PDF gives one DANFE; Download all DANFEs gives a ZIP with one PDF per invoice, each named after its 44-digit access key.
The best file is the authorized XML, which starts with nfeProc and carries the authorization protocol. A bare NFe without the protocol also opens, but its DANFE is marked as having no legal value.
What is on the DANFE
The PDF follows the A4 portrait layout of the DANFE technical manual (MOC 7.0, Anexo II), in the Times font the manual names. Text too long for its box is printed smaller and, at the limit, cut with an ellipsis; the full text stays in the XML. It has:
- the receipt stub, the issuer block, entry or exit, number, series and sheet count;
- a CODE-128C barcode of the access key, the key in eleven groups of four digits and the authorization protocol;
- buyer, instalments or payment forms, tax totals (ICMS, ICMS ST, IPI, PIS, COFINS and the rest), carrier and volumes;
- every item with code, description, NCM, CST or CSOSN, CFOP, unit, quantity, prices, ICMS and IPI, with the item's additional information under it;
- the additional information, continued on the next sheet when it is too long for the first.
Invoices with many items get extra sheets, each with the full header and barcode, numbered "FOLHA 2/3" and so on. Labels stay in Portuguese, as on any DANFE.
Checks and limits
The tool checks the access key's check digit and reads the protocol. It warns, in the list and on the PDF, when the invoice comes from the SEFAZ test environment ("SEM VALOR FISCAL"), when the protocol is missing or is not an authorization, and when the check digit is wrong. It does not contact SEFAZ, so it cannot see a later cancellation: check the access key on the national NF-e portal. NFC-e files (model 65, with a QR code) and CT-e files are recognised and refused with a message instead of becoming a wrong PDF.
Nothing is uploaded
The XML is read on your device by scripts loaded from DocFig, and the PDF is drawn there with the pdf-lib library. The page only sends tiny counters with an event name and no invoice content. How to check this yourself.
Sources
- NF-e portal: taxpayer guidance manual (MOC 7.0) and Anexo II, the DANFE and barcode specification (Portuguese)
- National NF-e portal: check an invoice by its access key
Sources checked 28 October 2026. The sample invoices use fictional companies and people and pass the official NF-e 4.00 schema (package PL_009).