Blog Document Converters NF-e XML to DANFE for a Whole...
NF-e XML to DANFE for a Whole Month: Most Free Tools Do One at a Time
Document Converters Nov 27, 2026 8 min read 23 views

NF-e XML to DANFE for a Whole Month: Most Free Tools Do One at a Time

Most free ways to turn an NF-e XML into a DANFE handle one note per click. Six real options compared, how to read the 44-digit access key, and when a batch converter is the wrong choice.

E
Emma
Author

It's the 3rd of the month and the client's ERP export just landed: notas.zip, 212 XML files, no PDFs. Your bookkeeping system wants a DANFE attached to every entry. The national portal looks up one access key at a time. The free web converters you can find take one file, give back one PDF, and want you to upload a supplier's invoice to a server you know nothing about.

So you click 212 times, or you find another way. Here's how the real options compare for a whole month of notes.

OptionCostNotes per runWhat you getWhere it falls down
National NF-e portal, consultation by access keyFreeOne key at a time, captcha each timeThe official status of the note, including events like a cancellationBuilt for checking a note, not for printing a stack of DANFEs
Your state SEFAZ portalFreeVaries by state, often one note per queryOfficial data, and in some states XML recovery for the taxpayerLogin rules and features differ from state to state
The issuer's ERP or free emitterIncluded in the softwareUsually a full batchA DANFE drawn by the same system that sent the noteOnly for notes that system issued. The XMLs you received aren't in it
Desktop XML viewer or validatorFree to paidUsually one file open at a timeA DANFE preview, sometimes a schema checkWindows installs, old versions, and printing one by one
Single-file web converterFree, often ad-supportedOne XML per uploadOne PDFYour client's invoices go to someone else's server, 212 times
Browser-side batch converterFreeMany XMLs or a ZIP of themOne PDF per note plus a ZIP of all of themReads only what's in the file, so it can't see a later cancellation

The XML is the nota, the DANFE is the printout

The NF-e exists only as a signed XML file. Minas Gerais' tax office puts it bluntly in SEF-MG's NF-e FAQ on the operating model: the DANFE is a mere graphic representation of the NF-e and isn't to be confused with it. Its job is to travel with the goods and give the person receiving them something to read and sign.

Two practical consequences. First, a DANFE regenerated from the XML shows the same data, since every field on it comes from that file. Second, it's the XML you have to keep. The same FAQ says issuer and recipient must hold the NF-e in digital form for the period set by tax legislation. It doesn't name a number of years, so ask whoever handles your tax compliance. Either way, a folder of PDFs isn't your archive.

The paper side is loose by comparison. SEFAZ-RS's NF-e questions and answers say a DANFE can be printed on ordinary A4 paper (newsprint excluded), and that each NF-e has exactly one DANFE, which can run to one or more sheets.

Reading the 44-digit chave de acesso

Every DANFE carries the access key twice: as digits in groups of four and as a barcode above them. Read by eye, it tells you a lot. Take the key from the sample note below:

3526 1012 3456 7800 0195 5500 1000 0045 8713 0418 2772

  • 35 is the state (UF) code. 35 is São Paulo, 31 is Minas Gerais, 41 is Paraná.
  • 2610 is the year and month of issue, here October 2026.
  • 12345678000195 is the issuer's 14-digit CNPJ.
  • 55 is the model. 55 is the NF-e; 65 would be an NFC-e, the consumer receipt.
  • 001 is the series and 000004587 the note number.
  • 1 is the issue type (1 is normal issue, other values mean contingency).
  • 30418277 is a random numeric code chosen by the issuer.
  • 2, the last digit, is a check digit. Mistype one digit anywhere and a lookup fails.

That adds up: 2 + 4 + 14 + 2 + 3 + 9 + 1 + 8 + 1 = 44. The SEFAZ-RS FAQ adds that the key can be typed, read with a barcode scanner, or pulled from the XML to query the note on the national site or the issuer's state SEFAZ. The barcode is Code 128, and since the key is all digits it fits the numeric subset, which packs two digits per symbol. That's why a 44-digit key fits across a narrow box.

Page 1 of a DANFE generated from an NF-e XML, showing the receipt stub, the issuer block, the access key barcode and number, the authorization protocol, tax totals, carrier data and three product lines.

nfeProc vs bare NFe, and why the protocol line matters

Open two XMLs from the same month and you may see two different root elements. A file starting with <nfeProc> holds the signed <NFe> plus a <protNFe> block: SEFAZ's answer, with a status code, the receipt time and a 15-digit authorization protocol number. Status 100 means the use was authorized. Files named ...-procNFe.xml are usually this kind.

A file starting with a bare <NFe> has no protocol. Maybe the ERP exported it before sending. Nothing in that file proves the state ever accepted it, so ask your supplier for the procNFe version. A careful generator prints the protocol number and date in the "Protocolo de autorização de uso" box when it's there, and refuses to pretend when it isn't.

The usual NF-e XML to DANFE routes, one file at a time

The national portal. The right place to check a note, wrong place to print 212 of them. You type or scan one key, solve a captcha, and see what the tax authorities have. SEF-MG's FAQ says the complete data can be consulted for 180 days after authorization; after that the query returns only partial information identifying the note. Treat it as the authority on status, not as a print shop.

The state SEFAZ. Some states let a logged-in taxpayer recover XMLs issued for their CNPJ. Useful when files are missing, not a bulk DANFE printer.

The issuer's ERP or free emitter. If your company issued the notes, this is the best answer: select the month, print. But it only knows notes it sent. Purchase invoices and notes from a customs broker or a marketplace panel are XMLs from somewhere else.

Desktop viewers and validators. Fine for checking one suspicious file. Most show one DANFE at a time.

Single-file web converters. Upload, wait, download, repeat. Every upload also sends names, CNPJs, CPFs, addresses and prices to a third party. For a client's books, I'd rather not.

Converting a folder of NF-e XML to DANFE in one go

What the monthly close needs is something that takes the whole batch and keeps the files on your machine. The NF-e XML to DANFE converter on this site works that way: you drop loose .xml files or a .zip, and the XML is parsed and the PDFs are drawn inside the browser tab. Nothing gets uploaded.

The limits that matter for a monthly run:

  • Up to 1,000 XML files per batch. Past that, it reads the first 1,000 and tells you so.
  • 5 MB per XML, 200 MB per ZIP, and 500 MB of XML unpacked from ZIPs in total.
  • Inside a ZIP it reads the .xml entries in any folder and skips macOS __MACOSX clutter. A ZIP nested inside the ZIP isn't opened.
  • Each PDF is named after its XML file, and a "Download all as ZIP" button appears once two or more notes convert.
  • Files that aren't model 55 NF-e get a reason next to their name instead of a PDF: NFC-e, CT-e and event XMLs like a cancellation are each refused with their own message.

The result screen lists issuer, recipient, total and access key per note, a handy sanity check on the batch.

Results table listing three converted NF-e files with issuer, recipient, invoice total and access key, where the third file is flagged as having no SEFAZ authorization and printed as SEM VALOR FISCAL.

Look at the third row. That file was a bare NFe with no protocol, so the tool flags it and stamps SEM VALOR FISCAL diagonally across every page, with a line in the additional data box saying the XML has no SEFAZ authorization. It does the same for notes issued in the homologation (test) environment, and for a protocol whose status isn't an authorization. Good. A clean-looking DANFE for a note the state never accepted is exactly what causes trouble at a receiving dock.

When a batch NF-e XML to DANFE converter is the wrong tool

  • NFC-e (model 65). The consumer receipt has its own layout with a QR code. This converter refuses it rather than squeezing it into an NF-e page.
  • CT-e. Transport documents need a DACTE, not a DANFE. Also refused.
  • You need the official answer. An auditor or a customer disputing a note wants the consultation result from the portal or the SEFAZ, not a PDF you generated.
  • Cancelled notes. A cancellation is a separate event registered after the fact. The original procNFe still says "authorized", so a DANFE printed from it looks perfectly valid. If cancellations are possible in your batch, check those keys on the portal. The converter can't know.
  • Notes your own ERP issued. Print from the ERP. Your customers already know that layout.

My blunt advice for the monthly close: keep the XMLs as the archive, batch the DANFEs for reading and attaching, and run a portal check only on the handful of notes where a cancellation is plausible. Don't let the PDFs become the record.