How to read a ZUGFeRD PDF and extract the XML
Updated 2026-10-20
A ZUGFeRD or Factur-X invoice looks like any other PDF. The difference is hidden inside: the PDF carries an XML file with all invoice data in machine-readable form. People read the PDF, software reads the XML. Here is how to get at that XML and check it.
Is my PDF a ZUGFeRD invoice?
Three quick ways to tell:
- Attachments in your PDF reader: in Adobe Acrobat Reader, open the attachments panel (paperclip icon). A ZUGFeRD invoice has an XML attachment, usually called
factur-x.xml(Factur-X and ZUGFeRD 2.1 or later),zugferd-invoice.xml(ZUGFeRD 2.0),ZUGFeRD-invoice.xml(ZUGFeRD 1.0) orxrechnung.xml(XRechnung profile). - Upload it to the viewer: the free e-invoice viewer says PDF (ZUGFeRD / Factur-X) if it finds embedded invoice data, and tells you if there is none.
- A note on the invoice: many senders mention ZUGFeRD or Factur-X in the footer or the email.
Extract the XML from the PDF
- Open the viewer and upload the PDF.
- The viewer extracts the embedded XML, shows its content and validates it against the official EN 16931 and XRechnung rules.
- Click Download embedded XML to save the XML file, for example to import it into accounting software that only accepts XML.
Alternatively, save the attachment from the attachments panel of your PDF reader. That gives you the file, but no check of whether it is valid.
Which profile is it, and does it count as an e-invoice?
ZUGFeRD and Factur-X come in profiles with more or less data. The viewer shows the profile at the bottom of the invoice. Under German rules, the profiles MINIMUM and BASIC WL do not count as e-invoices, because they lack the line items. BASIC, EN 16931 (formerly COMFORT), EXTENDED and XRECHNUNG do. If you receive a MINIMUM invoice from a German business that should send e-invoices, ask for a full one.
When the PDF and the XML disagree
In a ZUGFeRD invoice the XML is the leading part. If the amounts in the visible PDF differ from those in the XML, the XML counts. The viewer shows the XML content, so comparing it with the PDF quickly shows a mismatch. Ask the sender to correct it.
Need to send a ZUGFeRD invoice yourself?
einvoicegen creates a ZUGFeRD / Factur-X PDF (profile EN 16931) and an XRechnung XML from one simple form, both checked with the KoSIT validator. Your first invoice is free.
Need to send an e-invoice?
Create a valid XRechnung and ZUGFeRD invoice in 2 minutes, in English. Free preview, validated with the official KoSIT validator.
More guides
- What is XRechnung? A plain-English guide
- ZUGFeRD vs XRechnung: which one should you send?
- How to open an XRechnung XML file
- Leitweg-ID explained: invoicing German public authorities
- Reverse charge on e-invoices (XRechnung, ZUGFeRD)
- XRechnung validation errors explained (BR-DE-15, BR-CO-10, …)
- Convert XRechnung XML to PDF (free, online)
- Quba viewer alternative: open XRechnung online, no install
- Germany's e-invoicing mandate: what changes in 2027 and 2028
- E-invoices for small businesses (Kleinunternehmer) in Germany
- Invoicing a German client from abroad: e-invoice rules for UK, US and Swiss suppliers