ZUGFeRD Invoice Example: XML Structure and Processing

NameQuick Team··Invoice Processing

Learn More in the Docs

Try NameQuick Invoices

Review incoming e-invoices and prepare them for DATEV. No new accounting suite required.

TL;DR

  • Understanding the hybrid format: A ZUGFeRD invoice consists of a PDF/A-3 file with embedded CII XML. Humans read the PDF, machines read the XML. This duality makes the format flexible for day-to-day B2B operations.
  • Legal framework: Since 1 January 2025, businesses in Germany must be able to receive structured e-invoices. From 2027/2028, sending e-invoices will also be mandatory.
  • XML example: This article presents an annotated XML example with the key structural elements (context, header, line items, parties and totals).
  • Profile comparison: A table explains the six profiles (Minimum through Extended and XRechnung) and shows why only the higher profiles meet the legal requirements.
  • Automated processing: NameQuick Invoices reads XML data from received ZUGFeRD invoices, lets you review it in the browser and exports results as DATEV EXTF or CSV.
  • Try it yourself: Download a genuine ZUGFeRD sample invoice (PDF plus its extracted XML) below, then open it in the free XRechnung & ZUGFeRD viewer or check it with the E-Rechnung validator. Both run entirely in your browser, with no upload.

Germany's e-invoicing mandate is driving the shift to digital invoicing: since 1 January 2025, businesses must be able to receive structured e-invoices electronically. From 2027 (for revenues exceeding 800,000 EUR) or 2028, the obligation to send e-invoices also takes effect. A plain PDF no longer suffices: an e-invoice is a structured data set that can be processed without manual effort. The European standard EN 16931 requires an XML-based format for this purpose.

Two formats are permitted in Germany: XRechnung (a pure XML document) and the ZUGFeRD format (from version 2.0.1), which embeds XML inside a PDF/A-3. This article uses a concrete example to show how a hybrid ZUGFeRD invoice is structured, explains the XML layout and describes how you can process the format automatically.

What Is a ZUGFeRD Invoice?

ZUGFeRD stands for "Zentraler User Guide des Forums elektronische Rechnung Deutschland" (Central User Guide of the Forum for Electronic Invoicing Germany). The format combines a visually readable PDF/A-3 invoice with an integrated XML file. The PDF component serves as a conventional invoice document for humans, while the XML represents the entire invoice content in the CII standard (Cross Industry Invoice). The PDF/A-3 standard (ISO 19005-3) allows the embedding of arbitrary files and guarantees long-term archival.

The hybrid approach is the key difference from XRechnung. XRechnung invoices are pure XML files without a visual representation and are used primarily in the public sector. The ZUGFeRD format combines PDF and XML; from version 2.2, it complies with the EN 16931 standard.

Important: public-sector contracting authorities in Germany do not currently accept the hybrid format as an e-invoice. For government agencies, an XRechnung (UBL XML) must be submitted. For the B2B sector, however, ZUGFeRD is widely adopted because suppliers can continue sending a PDF to their business partners.

Structure of a ZUGFeRD Invoice: PDF and XML

The hybrid format consists of two closely linked parts:

PDF/A-3 Container: The PDF follows the familiar layout of an invoice. It contains all fonts and color profiles and allows file embedding. Additional attachments (e.g. proof of delivery) can also be embedded.

XML File (factur-x.xml): The embedded XML file contains all invoice data in machine-readable form. When opening the PDF, the user sees the visual invoice; software extracts the XML and processes the structured data.

This dual-format concept provides both readability and automation: software reads the structured XML fields directly, without OCR, so values such as invoice number, date and amounts do not need re-keying. For more on digital invoice processing, see our guide.

Download a Real ZUGFeRD Sample Invoice

To make the format concrete, here is a genuine ZUGFeRD invoice you can download, inspect and run through the free tools below. It is a synthetic sample: the parties and amounts are fictional and exist only for demonstration. Technically, though, it is the real thing — a valid PDF/A-3 with an embedded factur-x.xml, in the EN 16931 (COMFORT) profile, validated against the official XSD.

Sample ZUGFeRD invoice — EN 16931 (COMFORT)

A hybrid PDF/A-3 with an embedded factur-x.xml, plus the same XML as a standalone file. Fictional parties, amounts that add up, valid structure.

Synthetic sample for demonstration only — Muster GmbH and Beispiel Handel AG are not real companies.

What the sample contains

FieldValue
ProfileZUGFeRD 2.x, EN 16931 (COMFORT)
Invoice numberMUSTER-2026-0042
Invoice date15 February 2026
Due date1 March 2026
SellerMuster GmbH, Musterstrasse 12, 10115 Berlin (VAT DE123456789)
BuyerBeispiel Handel AG, Beispielweg 5, 80331 Munich (VAT DE987654321)
Line 1Consulting, 4 h at 90.00 EUR = 360.00 EUR (19% VAT)
Line 2Software project licence, 1 at 240.00 EUR = 240.00 EUR (19% VAT)
Net total600.00 EUR
VAT (19%)114.00 EUR
Grand total714.00 EUR

Open the sample in the viewer

  1. Download the ZUGFeRD PDF above.
  2. Open the free XRechnung & ZUGFeRD viewer.
  3. Drop the PDF onto the upload area. The viewer extracts the embedded factur-x.xml right in your browser and lays out every field — seller, buyer, line items, tax breakdown and totals. Nothing is uploaded.

Want to check a file against EN 16931 rules instead of just reading it? Run the PDF or the XML through the E-Rechnung validator, which confirms the structure, required fields and arithmetic client-side. To test one of your own incoming invoices, drop it into either tool — the files never leave your device.

Example: XML Structure of a ZUGFeRD Invoice

The excerpt below is taken from the sample invoice above, in the CII format. Comments explain the meaning of the tags; the second line item and some optional fields are omitted for brevity. The full XML is in the downloadable file.

<?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">

  <!-- Context: standard and profile (here: EN 16931 / COMFORT) -->
  <rsm:ExchangedDocumentContext>
    <ram:GuidelineSpecifiedDocumentContextParameter>
      <ram:ID>urn:cen.eu:en16931:2017</ram:ID>
    </ram:GuidelineSpecifiedDocumentContextParameter>
  </rsm:ExchangedDocumentContext>

  <!-- Document header: invoice number, type and date -->
  <rsm:ExchangedDocument>
    <ram:ID>MUSTER-2026-0042</ram:ID>     <!-- Invoice number -->
    <ram:TypeCode>380</ram:TypeCode>      <!-- 380 = Invoice -->
    <ram:IssueDateTime>
      <udt:DateTimeString format="102">20260215</udt:DateTimeString>
    </ram:IssueDateTime>
  </rsm:ExchangedDocument>

  <!-- Trade details: line items, parties and totals -->
  <rsm:SupplyChainTradeTransaction>

    <!-- Invoice line item (line 2 omitted for brevity) -->
    <ram:IncludedSupplyChainTradeLineItem>
      <ram:AssociatedDocumentLineDocument>
        <ram:LineID>1</ram:LineID>
      </ram:AssociatedDocumentLineDocument>
      <ram:SpecifiedTradeProduct>
        <ram:Name>Beratungsleistung Rechnungsdigitalisierung</ram:Name>
      </ram:SpecifiedTradeProduct>
      <ram:SpecifiedLineTradeAgreement>
        <ram:NetPriceProductTradePrice>
          <ram:ChargeAmount>90.00</ram:ChargeAmount>
        </ram:NetPriceProductTradePrice>
      </ram:SpecifiedLineTradeAgreement>
      <ram:SpecifiedLineTradeDelivery>
        <ram:BilledQuantity unitCode="HUR">4.00</ram:BilledQuantity>
      </ram:SpecifiedLineTradeDelivery>
      <ram:SpecifiedLineTradeSettlement>
        <ram:ApplicableTradeTax>
          <ram:TypeCode>VAT</ram:TypeCode>
          <ram:CategoryCode>S</ram:CategoryCode>
          <ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
        </ram:ApplicableTradeTax>
        <ram:SpecifiedTradeSettlementLineMonetarySummation>
          <ram:LineTotalAmount>360.00</ram:LineTotalAmount>
        </ram:SpecifiedTradeSettlementLineMonetarySummation>
      </ram:SpecifiedLineTradeSettlement>
    </ram:IncludedSupplyChainTradeLineItem>

    <!-- Seller and buyer -->
    <ram:ApplicableHeaderTradeAgreement>
      <ram:SellerTradeParty>
        <ram:Name>Muster GmbH</ram:Name>
      </ram:SellerTradeParty>
      <ram:BuyerTradeParty>
        <ram:Name>Beispiel Handel AG</ram:Name>
      </ram:BuyerTradeParty>
    </ram:ApplicableHeaderTradeAgreement>

    <!-- Currency, tax breakdown and grand total -->
    <ram:ApplicableHeaderTradeSettlement>
      <ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
      <ram:ApplicableTradeTax>
        <ram:CalculatedAmount>114.00</ram:CalculatedAmount>
        <ram:TypeCode>VAT</ram:TypeCode>
        <ram:BasisAmount>600.00</ram:BasisAmount>
        <ram:CategoryCode>S</ram:CategoryCode>
        <ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
      </ram:ApplicableTradeTax>
      <ram:SpecifiedTradeSettlementHeaderMonetarySummation>
        <ram:LineTotalAmount>600.00</ram:LineTotalAmount>
        <ram:TaxBasisTotalAmount>600.00</ram:TaxBasisTotalAmount>
        <ram:TaxTotalAmount currencyID="EUR">114.00</ram:TaxTotalAmount>
        <ram:GrandTotalAmount>714.00</ram:GrandTotalAmount>
        <ram:DuePayableAmount>714.00</ram:DuePayableAmount>
      </ram:SpecifiedTradeSettlementHeaderMonetarySummation>
    </ram:ApplicableHeaderTradeSettlement>

  </rsm:SupplyChainTradeTransaction>
</rsm:CrossIndustryInvoice>

The excerpt illustrates the structure: context (profile and standard), header (invoice number and date), line items (product, price, quantity, VAT rate) and settlement (currency, tax breakdown and grand total). During import, software reads these fields and maps them to the business terms defined in EN 16931.

ZUGFeRD Profiles Compared

Not every ZUGFeRD invoice is EN-compliant. The format defines six profiles with varying levels of data depth. Per the German Ministry of Finance guidance (BMF letter, 15 October 2024), ZUGFeRD from version 2.0.1 meets the requirements of the e-invoicing mandate — only the Minimum and Basic WL profiles are excluded.

ProfileData ScopeEN 16931-CompliantTypical Use
MinimumMetadata only (invoice number, date). No line item or tax data.NoArchival
Basic WLHeader + totals without individual line items.NoCollective invoices, receipts
BasicFull line items with prices and quantities (EN 16931 core model).YesStandard domestic invoices
EN 16931 (Comfort)Complete EN 16931 data model including all required BT fields.YesStandard for B2B and EU trade
ExtendedComfort + additional optional fields (e.g. proof of delivery).YesComplex scenarios
XRechnungComfort data model with German CIUS rules; pure XML without PDF.YesB2G invoices (government)

For the e-invoicing mandate, you should select at least the Comfort profile. The Extended profile is suitable for extensive supplementary information, while XRechnung is mandatory for communication with government agencies.

Receiving and Processing ZUGFeRD Invoices

Why Automated Processing?

The e-invoicing mandate requires businesses to receive and retain electronic invoices. At the same time, manual import and data entry are error-prone and time-consuming. Modern invoice software uses OCR, artificial intelligence and XML parsing to read invoice data automatically. Reliable capture facilitates posting in financial accounting and supports archiving aligned with the GoBD principles.

How NameQuick Invoices Works

NameQuick Invoices is a web-based solution for reviewing received invoices. It runs in the browser, is hosted in Germany and is DSGVO-compliant. It is built around GoBD principles — unchangeable originals, traceable corrections and a full operation history — rather than a blanket GoBD certification. NameQuick Invoices receives and reviews invoices and exports them for DATEV; it does not create or issue invoices. The workflow:

  1. Invoice intake: Upload received invoices or forward them to a shared email address.
  2. Automatic recognition: The system detects the format and reads the structured XML fields directly from ZUGFeRD and XRechnung files, so the data does not need re-keying. For PDF invoices without XML, on-device OCR is used and each field gets a confidence score.
  3. Review: In a review queue, you check the extracted fields. Confidence scores flag uncertain values, and duplicate invoices are detected automatically.
  4. Export: Export the reviewed data as CSV or in the DATEV EXTF format for your tax advisor. The original documents are stored unchanged, with a full operation history.

Unlike complex DMS systems, no IT department is needed. Setup takes a few minutes. Plans from 9 EUR per month offer different quotas and export options. For more details on invoice intake software, see our comparison.

Review incoming e-invoices and prepare them for DATEV

Open XRechnung and ZUGFeRD, review invoice data, and export as DATEV EXTF.

Creating vs. Receiving a ZUGFeRD Invoice

Many businesses ask: how do I create a ZUGFeRD invoice? Receiving works with automated tools, while creating requires generating a PDF/A-3 and a structured CII XML, embedding them together and validating the result. Specialized libraries and accounting software (e.g. Lexware, sevDesk or easybill) simplify these steps.

NameQuick Invoices covers only receipt and further processing. Creation is handled by other accounting programs. For invoices to public-sector contracting authorities, you should use the XRechnung profile directly, as the hybrid format is not accepted there.

Frequently Asked Questions

What is a ZUGFeRD invoice?

A ZUGFeRD invoice is a hybrid e-invoice in PDF/A-3 format with an embedded XML file. The XML contains all invoice data in the CII standard, while the PDF provides a human-readable document. From version 2.0.1, ZUGFeRD is EN 16931-compliant.

How do I send a ZUGFeRD invoice?

You need to create a PDF/A-3, generate a valid CII XML, embed it as factur-x.xml and validate the complete package. Send ZUGFeRD invoices by email. For B2G invoices, XRechnung is recommended.

Can I convert a PDF into a ZUGFeRD invoice?

Yes. You need software that converts your existing PDF into a PDF/A-3 and generates the invoice data as CII XML. A plain PDF without XML is not an e-invoice.

What is the difference between ZUGFeRD and XRechnung?

ZUGFeRD contains PDF and XML; XRechnung is XML only. Both formats are EN 16931-compliant and satisfy the e-invoicing mandate. ZUGFeRD is flexible for B2B, while XRechnung is required for the public sector.

Which ZUGFeRD profiles are permitted?

For the e-invoicing mandate, ZUGFeRD from version 2.0.1 is accepted with the exception of the Minimum and Basic WL profiles. The full Basic profile qualifies; Minimum and Basic WL do not.

How does NameQuick Invoices read a ZUGFeRD invoice?

The software reads the XML directly from the embedded file, extracts the fields and assigns each value a confidence score; low-confidence fields are flagged for review. The PDF is kept unchanged as the receipt. NameQuick Invoices receives and reviews invoices and exports them for DATEV — it does not create invoices.

What does it cost to process ZUGFeRD invoices?

NameQuick Invoices offers plans from 9 EUR per month (Starter: 50 invoices, CSV export). The Core plan (19 EUR/month) includes 200 invoices and DATEV EXTF export. For larger offices, there is the Team plan (39 EUR/month, 1,000 invoices).

Official Sources

The NameQuick team writes practical guides for file organization, document workflows, and automation with NameQuick.

This article is for general information and does not replace legal, tax, or accounting advice. Verify requirements with a qualified professional.

Get started

Ready to streamline your invoices?

NameQuick Invoices turns mixed-format invoices into clean, accountant-ready records.