Standards

XRechnung vs ZUGFeRD: which e-invoicing standard do you need?

By Mohamed Waleed

XRechnung vs ZUGFeRD: which e-invoicing standard do you need?

If you sell into Germany you have probably run into both XRechnung and ZUGFeRD and wondered whether you need one or both. The short answer: they serve different delivery channels but share the same data model, so the choice depends on who receives your invoices and how they want them delivered. This post breaks down the differences so you can pick the right format without reading three specification PDFs.

The shared foundation: EN 16931

Both XRechnung and ZUGFeRD are built on EN 16931, the European e-invoicing standard. EN 16931 defines the semantic content of an electronic invoice: which fields must be present, what values they can carry, and the business rules they must satisfy. It is syntax-agnostic, so the same invoice data can be serialized as CII XML or UBL XML.

Because both formats inherit from EN 16931, a compliant invoice in either format carries the same business terms (the BT and BG elements). The difference is in how that data is packaged and delivered.

XRechnung: XML for the public sector

XRechnung is the German public-sector e-invoice format. It is a CIUS, a country-specific customization of EN 16931 maintained by KoSIT, the German federal IT standards office.

A XRechnung invoice is a standalone XML file. There is no PDF page, no human-readable layer. The recipient's financial system parses the XML directly. The current version is 3.0.2, and it is serialized as CII XML (UBL 2.1 is also supported).

XRechnung adds German-specific rules on top of EN 16931. The most visible one is the Leitweg-ID, a buyer reference that routes the invoice to the correct recipient system. Every XRechnung invoice must pass the KoSIT XSD schema and Schematron rule set to be considered valid.

When to use XRechnung

You need XRechnung when your customer is a German federal, state, or municipal authority that requires structured XML delivery. Public-sector buyers in Germany must accept structured e-invoices, and XRechnung is the format their systems are built around. If you invoice German government bodies, XRechnung is not optional.

ZUGFeRD: PDF with embedded XML

ZUGFeRD takes a different approach. Instead of a bare XML file, it ships a human-readable PDF/A-3 document with the same CII XML embedded inside it. A person can open the PDF and read it like a normal invoice. A machine can extract the embedded XML and process it automatically. You get both surfaces in one file.

ZUGFeRD is maintained by FeRD, the German Forum for Electronic Invoicing. The current version is 2.5.2. The format is also known as Factur-X in France, where it is the national e-invoicing format. Same specification, two names.

ZUGFeRD profiles

ZUGFeRD defines a set of profiles that trade detail for simplicity. From lightest to heaviest:

  • MINIMUM: a booking aid with the bare minimum of fields for the recipient to post the invoice.
  • BASICWL: basic without lines. Enough to identify the invoice and its totals, but no line-item detail.
  • BASIC: basic with line items. Covers the common small-business invoice.
  • EN16931: the full EN 16931 data set. This is the profile most businesses need for compliance.
  • XRECHNUNG: the EN16931 profile with the XRechnung customization layered on top. Use this when your recipient wants a PDF but also needs the German public-sector rules satisfied.
  • EXTENDED: a superset of EN 16931 that adds fields for more complex scenarios like downstream settlement.

Most B2B invoices that need ZUGFeRD use the EN16931 profile. If your recipient is a German public authority that accepts ZUGFeRD, the XRECHNUNG profile gives you the PDF surface plus the XRechnung rule compliance in one file.

When to use ZUGFeRD

You need ZUGFeRD when your customer wants a human-readable invoice they can also process electronically. Many German businesses, especially in B2B, prefer ZUGFeRD because their accounting team can read the PDF while their software extracts the XML. It is also the right choice when you need to send the same invoice to a person and a machine.

The key differences side by side

XRechnungZUGFeRD
ContainerXML onlyPDF/A-3 with embedded XML
Human-readableNoYes (the PDF page)
Machine-readableYes (the XML file)Yes (embedded XML)
Maintained byKoSITFeRD
Current version3.0.22.5.2
XML syntaxCII (and UBL)CII
Typical useGerman public sectorGerman B2B, cross-border
ProfilesSingle profileMINIMUM through EXTENDED

Can you use both?

Yes, and many companies do. Because both formats share the EN 16931 data model, you can generate the same invoice in both formats from a single source payload. InvoiceSpec does exactly this: you send one JSON request and choose the output format. The engine maps the canonical invoice data to CII XML for XRechnung or to a PDF/A-3 with embedded CII XML for ZUGFeRD, then validates the result against the official KoSIT and FeRD rule sets.

If you invoice both public-sector and private-sector customers in Germany, generating both formats from one payload means you maintain one data model, not two.

How to generate both formats

You can generate XRechnung and ZUGFeRD with a single API call each. The XRechnung endpoint returns validated CII XML, and the ZUGFeRD endpoint returns a PDF/A-3 with the embedded XML. Both endpoints accept the same invoice JSON schema, so you reuse the same payload.

For a quick test without writing code, try the free XRechnung Generator or the ZUGFeRD Generator. Both tools produce real, validated output from a form.

Frequently asked questions

Is ZUGFeRD the same as Factur-X?

Yes. ZUGFeRD is the German name and Factur-X is the French name for the same specification. A ZUGFeRD 2.5.2 invoice and a Factur-X 1.0.07 invoice are the same file.

Can a ZUGFeRD PDF replace a XRechnung XML?

It depends on the recipient. A ZUGFeRD PDF in the XRECHNUNG profile satisfies the XRechnung business rules, but some German public-sector systems only accept standalone XRechnung XML files. Check with your recipient before substituting one for the other.

Do XRechnung and ZUGFeRD use the same XML?

Both use CII XML based on EN 16931. XRechnung adds German-specific rules via Schematron. ZUGFeRD embeds the CII XML inside a PDF/A-3 and adds profile-specific identifiers. The underlying data model is the same.

Pick the format your recipient expects

The choice between XRechnung and ZUGFeRD comes down to delivery. If your recipient is a German public authority that wants structured XML, use XRechnung. If your recipient wants a readable PDF they can also process electronically, use ZUGFeRD. Both formats share the EN 16931 data model, so you can generate either from the same invoice data and let the recipient decide how to consume it.

Read the API reference to generate XRechnung and ZUGFeRD programmatically, or start a free trial to issue your first compliant e-invoice in minutes.

XRechnungZUGFeRDEN 16931Factur-Xcomparison

Mohamed Waleed

Founder, InvoiceSpec

Mohamed is the founder of InvoiceSpec, where he builds the e-invoicing infrastructure software companies use to ship compliant XRechnung, ZUGFeRD, and EN 16931 documents without maintaining the logic in-house. He writes about German e-invoicing compliance in plain terms for the finance and ops teams who have to meet it.

Related posts

Standards

Generate your first compliant e-invoice in minutes. InvoiceSpec handles the EN 16931 rules and the German CIUS additions so you don't maintain that logic in-house.

Start a free trial