How to extract the XML from a Factur-X
- Drop the PDF in the area above, or choose it on your computer.
- The tool looks for the XML hidden in the PDF. It shows its start, the format recognized and a summary of the invoice, with its number, seller and total.
- Click “Download the XML”. You get an .xml file named after the PDF, and the PDF stays as it is.
To read the invoice in plain view rather than its code, use the invoice reader, which does the same extraction before showing the fields.
Where the XML hides in a Factur-X PDF
A Factur-X is a PDF/A-3, a variant of PDF designed for archiving that accepts attached files. The invoice’s XML is attached to it, most often under the name factur-x.xml, like an attachment slipped inside the document. Your PDF reader shows the page and doesn’t show this file, which is why it seems not to exist.
The XML is also compressed, so opening the PDF in a text editor gives nothing readable. The tool goes through the PDF’s content, decompresses each block and keeps the first one that looks like an XML invoice, in CII or UBL format. Everything happens in your browser. Our glossary entry on Factur-X explains why the invoice is built this way.
What the embedded XML contains
The XML of a Factur-X follows the CII syntax. It holds everything the PDF shows, stored in tags that accounting software reads without typing errors.
<?xml version="1.0" encoding="UTF-8"?><rsm:CrossIndustryInvoice xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100" xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100"> <rsm:ExchangedDocumentContext> <ram:GuidelineSpecifiedDocumentContextParameter> <ram:ID>urn:cen.eu:en16931:2017</ram:ID> </ram:GuidelineSpecifiedDocumentContextParameter> </rsm:ExchangedDocumentContext> <rsm:ExchangedDocument> <ram:ID>FA-88231</ram:ID> <ram:TypeCode>380</ram:TypeCode> <ram:IssueDateTime> <udt:DateTimeString format="102">20261001</udt:DateTimeString> </ram:IssueDateTime> </rsm:ExchangedDocument> <rsm:SupplyChainTradeTransaction> <ram:IncludedSupplyChainTradeLineItem>…</ram:IncludedSupplyChainTradeLineItem> <ram:ApplicableHeaderTradeAgreement> <ram:SellerTradeParty> <ram:Name>Lumen Hébergement</ram:Name> <ram:SpecifiedLegalOrganization> <ram:ID schemeID="0002">222222222</ram:ID> </ram:SpecifiedLegalOrganization> </ram:SellerTradeParty> <ram:BuyerTradeParty> <ram:Name>Camille Martin EI</ram:Name> </ram:BuyerTradeParty> </ram:ApplicableHeaderTradeAgreement> <ram:ApplicableHeaderTradeDelivery/> <ram:ApplicableHeaderTradeSettlement> <ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode> <ram:SpecifiedTradeSettlementPaymentMeans> <ram:TypeCode>58</ram:TypeCode> <ram:PayeePartyCreditorFinancialAccount> <ram:IBANID>FR76…8823</ram:IBANID> </ram:PayeePartyCreditorFinancialAccount> </ram:SpecifiedTradeSettlementPaymentMeans> … <ram:SpecifiedTradeSettlementHeaderMonetarySummation> <ram:LineTotalAmount>24.00</ram:LineTotalAmount> <ram:TaxBasisTotalAmount>24.00</ram:TaxBasisTotalAmount> <ram:TaxTotalAmount currencyID="EUR">4.80</ram:TaxTotalAmount> <ram:GrandTotalAmount>28.80</ram:GrandTotalAmount> <ram:DuePayableAmount>28.80</ram:DuePayableAmount> </ram:SpecifiedTradeSettlementHeaderMonetarySummation> </ram:ApplicableHeaderTradeSettlement> </rsm:SupplyChainTradeTransaction></rsm:CrossIndustryInvoice>
| What you’re looking for | Where to find it in the XML |
|---|---|
| The invoice number | rsm:ExchangedDocument then ram:ID |
| The type of document | ram:TypeCode, which is 380 for an invoice and 381 for a credit note |
| The issue date | ram:IssueDateTime, written YYYYMMDD. Tools that read the invoice show 20261001 as Oct 1, 2026. |
| The Factur-X profile | ram:GuidelineSpecifiedDocumentContextParameter |
| The seller and their SIREN (the French company number) | ram:SellerTradeParty, with ram:Name and ram:SpecifiedLegalOrganization |
| The buyer | ram:BuyerTradeParty |
| The currency and the IBAN | ram:InvoiceCurrencyCode and ram:IBANID |
| The totals excluding VAT, VAT and including VAT | ram:TaxBasisTotalAmount, ram:TaxTotalAmount and ram:GrandTotalAmount |
| The invoice lines | ram:IncludedSupplyChainTradeLineItem, one tag per line |
The five Factur-X profiles
Not every Factur-X holds as much data. The profile, given at the top of the XML, says how far the file goes.
| Profile | What the XML contains |
|---|---|
| MINIMUM | The parties, the references and the totals, without the lines |
| BASIC WL | The header, VAT by rate and the totals, without the lines |
| BASIC | The invoice with its lines, in a simplified form |
| EN 16931 | Everything the European standard requires, lines included |
| EXTENDED | The standard, plus data useful to some industries |
With a MINIMUM or BASIC WL profile, the reader shows “No invoice line found in this file”. That’s normal, since these profiles don’t contain any.
Extracting the XML without this tool
The XML is an attachment of the PDF, so any software that can list a PDF’s attachments can save it. Most PDF readers built into browsers don’t show them, Firefox aside.
| With | How |
|---|---|
| Adobe Acrobat Reader | Open the left-hand panel and click the paper clip icon. Right-click factur-x.xml to save the attachment. |
| Firefox | Open the PDF in Firefox, show the sidebar, then the list of attachments. Click factur-x.xml to save it. |
| The command line | pdfdetach -list facture.pdf lists the attachments, and pdfdetach -saveall facture.pdf saves them. The tool is part of Poppler. |
| Python | The factur-x library provides the command facturx-pdfextractxml facture.pdf factur-x.xml. |
When no XML is found
The tool then says “No XML in this PDF”. Most often, one of these situations explains it.
- The PDF isn’t a Factur-X. It’s an ordinary PDF, or the scan of a paper invoice.
- The PDF was saved again. An invoice that went through “Print to PDF” loses its attached XML, and a compression or editing tool can lose it too.
- It’s a ZUGFeRD 1.0 invoice, the old German version of the format, which the tool doesn’t recognize.
- The XML is stored in the PDF in an unusual way that the tool can’t decode.
Then ask the supplier for the original file, or download it from your accredited platform. If they send you the XML on its own, our page on opening an XML invoice file explains what to do with it.
What to do with the extracted XML
It’s useful when software asks for it, such as an accounting tool that imports invoices in XML format. It’s also useful to check what the invoice really states, since the PDF and the XML of a Factur-X must say the same thing. If an amount differs between the two, tell the supplier. The invoice check also tells you whether seven basic mentions are present.
For your records, keep the original PDF. It is the invoice, XML included, and the extracted file is only a copy. Our guide to archiving e-invoices covers the retention rules.
Frequently asked questions
Is the original PDF changed?
No. The tool reads the file in your browser without writing anything to it. The downloaded XML is a copy, and your PDF stays identical.
What does “Factur-X (embedded CII XML)” mean?
That the PDF you dropped contains an XML invoice written in the CII syntax, the one every Factur-X uses. So the extracted file is a CII XML: dropped on its own in the invoice reader, it shows as “CII”, since there’s no PDF around it anymore.
Can I edit the XML and put it back in the PDF?
Not on an invoice you received. An issued invoice isn’t corrected after the fact. The supplier issues a corrective invoice or a credit note, and an edited PDF would no longer be the original to keep.
What about German ZUGFeRD invoices?
From version 2 onward, ZUGFeRD uses the same XML as Factur-X, and the tool finds it the same way. The old version 1.0 isn’t recognized.
Can I process several PDFs at once?
No, one PDF at a time. The invoice renamer accepts a whole folder, but it renames the files without extracting their XML.
Are my files sent anywhere?
No. The PDF is read in your browser, nothing goes through a server and nothing is kept. When you close the tab, nothing is left.
Do I need an account?
No. You open the page and drop your PDF, with no account or email address.
Sources, checked on October 13, 2026: Factur-X specification, FNFE-MPE · impots.gouv.fr, je découvre la facturation électronique (in French) · economie.gouv.fr (in French) · EN 16931-1 standard, published by CEN · ISO 19005-3 standard (PDF/A-3).