XML to Excel converter
Open an XML file — an NFS-e, an NF-e, or any other format — and the tool turns it into a spreadsheet: every element becomes a column whose name is the path down to it, and you download CSV or Excel. Nothing is sent to a server: reading, flattening and writing all happen in your browser.
Pick the XML files, or drop them here.
Several files at once is fine: they become rows of the same spreadsheet.
Spreadsheet options
This tool handles up to 10 MB per batch. The ceiling exists because the whole XML becomes text in your browser memory — beyond that the tab freezes instead of delivering the spreadsheet.
The column name is the full path, and that is what makes the sheet usable. “emit/CNPJ” and “toma/CNPJ” come out as two separate columns even though the element name repeats in the file; the “versao” attribute sitting on the root gets its own column, written with an @ in front. An XML with fifty text values produces around fifty columns.
Batches are the normal case: pick ten or a hundred files at once and they become ten or a hundred rows of one sheet, with the columns unioned across them. If one file carries a field the others do not, that column still exists and simply stays empty where there is no value — no per-file spreadsheet you then have to merge by hand.
How to use
- Drop the XML files on the area, or use the file picker. Mixing invoices from different periods is fine: a column is decided by the path inside the file, not by the order the files arrived in.
- Check the summary before downloading: column count, data row count, and the encoding the tool actually read from each file. This is where you can see, on screen, that an XML arrived as latin1 when you expected utf-8.
- If the batch has a repeated element — the service items of an NF-e, say — the “one row per repeated element” box arrives already ticked, and each occurrence gets its own row. Untick it if you would rather have everything concatenated in one cell.
- Pick your download. CSV opens with the accents intact because it ships with a BOM up front and quotes every field containing a comma, a quote or a line break; XLSX is a native workbook, with the sheet named after the file.
What becomes a column, what becomes a row, what stays out
A column is the element path joined with dots, keeping the namespace prefix exactly as the file writes it. That is the whole design: the tool does not guess what anything means, it reports where the value sat. A field that appears under two different parents shows up twice in the sheet, which is precisely how you find out which of the two is wrong.
The file is read as text before any parsing, and the encoding is decided during that read: a BOM wins; without one the bytes are tested as utf-8 and, if they fail, fall back to latin1 — which covers the windows-1252 many fiscal files arrive in. The encoding used is written into the summary, because guessing quietly is how an accent turns into a question mark in your sheet.
What the tool does not do fits in one line: it does not validate a layout or a schema, it does not check a check digit, it does not verify tax authorisation, and it is not a substitute for the official extract. It reads what the file says and hands you the sheet. A malformed XML returns a named error instead of a partial sheet, and a well-formed but semantically wrong file still lands in the sheet — because the tool never judges content.
There is a stated ceiling: 10 MB across the whole batch. It is not a usage limit, it is the point where an XML turned into text in memory starts freezing the tab instead of delivering a spreadsheet. Any cell longer than 32,767 characters is cut in both outputs — for Excel that is a rule of the format, and in CSV it is what stops one long value from splitting a row in half.
| In the file | In the sheet | Why |
|---|---|---|
| “emit” and “toma”, each holding a “CNPJ” | Two columns: emit.CNPJ and toma.CNPJ | A column is the path, not the node name; merging the two hides which side is wrong. |
| An attribute on the root, such as versao="1.00" | Its own column, written _root.@versao | An attribute is not a child, and the @ keeps it from ever colliding with an element of the same name. |
| A repeated element, like ten service items | One row per occurrence while the box is ticked | Jamming them into one cell works, but leaves you nothing to sum, filter or sort afterwards. |
| A “Signature” block with the certificate inside | Left out, with the discard box ticked | Thousands of base64 characters nobody looks for in a spreadsheet — and the box lets you bring them back. |
| An element that is empty or self-closing | An empty cell | An empty cell is what Excel can filter; writing the word “undefined” there would turn absence into data. |
| An xmlns declaration on an element | Never becomes a column | It is namespace metadata, it repeats in every file, and it carries no value from the document. |