XRechnung vs ZUGFeRD: what's the difference?

An XML file or a PDF with the XML inside, KoSIT's rules or the profile's: the two German e-invoice formats compared, and which one to send to whom

· 5 min read · Oleksii Babintsev

Germany's e-invoicing mandate accepts two formats, and they get compared as if they were rivals. They are closer than that. Both carry the same EN 16931 invoice data, both can be written in the same XML syntax, and one of ZUGFeRD's profiles is XRechnung. What differs is the envelope, who sets the rules, and how strict those rules are.

The short version

XRechnung ZUGFeRD / Factur-X
What you send An XML file A PDF/A-3 with the XML attached
XML syntax UBL 2.1 or UN/CEFACT CII CII
Maintained by KoSIT, for the German public sector FeRD (Germany) and FNFE (France), the same specification under two names
Rules EN 16931 plus the German BR-DE-* rules EN 16931 plus each profile's own rules
Readable by a person With a viewer Open the PDF
Counts as an e-invoice in Germany Yes From version 2.0.1, in any profile but MINIMUM and BASIC WL

Since 1 January 2025 every business in Germany must be able to receive both. From 2027 larger businesses must send e-invoices, and from 2028 all of them; the XRechnung validator page for Germany has the details and the sources.

XRechnung: XML and nothing else

An XRechnung is a plain XML document, in UBL or in CII, that says in its specification identifier (BT-24) that it follows XRechnung:

urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0

KoSIT publishes the standard, the validation rules and a reference validator. The rules are EN 16931's, plus 39 German ones (BR-DE-*, and 14 more for the extension, BR-DEX-*) that make optional EN 16931 fields required (a buyer reference, payment instructions, a seller contact with phone and email, the seller's and buyer's city and post code) and forbid some combinations.

It was designed for public buyers, whose systems read the XML directly and route it by the Leitweg-ID in the buyer reference. That is also its weak point between businesses: someone who opens an XRechnung in a browser sees tags, not an invoice. The usual answer is a viewer that renders it, such as KoSIT's visualization, which the e-invoice viewer runs in the browser.

ZUGFeRD: a PDF with the XML inside

A ZUGFeRD invoice is a PDF that looks like any other invoice, with the same data attached as a CII XML file. It has to be PDF/A-3, the archival form of PDF that allows attachments, and the attachment has to be declared the way the specification says: named factur-x.xml (or xrechnung.xml in the XRECHNUNG profile), related to the document as its Alternative (Data for MINIMUM and BASIC WL), and described in the PDF's XMP metadata with the profile it follows.

Factur-X is the same specification published in France by FNFE; ZUGFeRD 2.x and Factur-X 1.x produce the same files. The profiles, from least to most data:

Profile BT-24 An e-invoice in Germany
MINIMUM urn:factur-x.eu:1p0:minimum No
BASIC WL urn:factur-x.eu:1p0:basicwl No
BASIC urn:cen.eu:en16931:2017#compliant#urn:factur-x.eu:1p0:basic Yes
EN 16931 (COMFORT) urn:cen.eu:en16931:2017 Yes
EXTENDED urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended Yes
XRECHNUNG urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0 Yes

MINIMUM and BASIC WL do not carry invoice lines, so they do not meet EN 16931 at all. Running the official MINIMUM example through the EN 16931 rules gives seven errors, BR-CO-10 "Sum of Invoice line net amount (BT-106) = Σ Invoice line net amount (BT-131)" among them, because there are no lines to sum.

In Germany the XML is the leading part of a hybrid invoice. If the PDF and the XML disagree, the XML is the invoice, which makes it worth checking that the two say the same thing; that is the subject of another post.

Same data, different rules

Because ZUGFeRD's EN 16931 profile and XRechnung in CII are the same syntax with the same fields, it is tempting to treat them as interchangeable. The specification identifier decides which rules apply, and the German ones are stricter.

FNFE's own Factur-X EN 16931 example passes the EN 16931 rules without a finding. Change only its BT-24 to XRechnung's and run KoSIT's rules:

BR-DE-23-b  Wenn BT-81 "Payment means type code" einen Schlüssel für Überweisungen enthält (30, 58), dürfen BG-18 und BG-19 nicht übermittelt werden.

The example says it will be paid by credit transfer (payment means 30) and also carries a payment card (BG-18) and a direct debit account (BG-19). EN 16931 allows that; XRechnung does not, because a German public buyer's system should not have to guess which of three payment methods applies. One identifier changed, one error. In the other direction, an invoice built for XRechnung almost always passes as ZUGFeRD EN 16931, since XRechnung only adds requirements.

Which one to send

  • To a German public buyer: XRechnung, with the Leitweg-ID in the buyer reference.
  • To a business that reads invoices by eye or by email: ZUGFeRD in the EN 16931 profile. The receiver who has software reads the XML, the one who doesn't reads the PDF, and both receive a valid e-invoice.
  • To a business on Peppol: usually Peppol BIS Billing, a UBL format with its own rules.
  • When you are not sure: ask the receiver. Since 2025 they must accept an EN 16931 invoice, but which format their software handles best is a practical question, not a legal one.

Checking either one

The validator takes both. An XRechnung is checked against the UBL or CII schema, EN 16931 and KoSIT's rules with the levels of KoSIT's configuration, so a rule KoSIT treats as a warning is a warning here too. A ZUGFeRD PDF can be dropped as it is: the XML is taken out in the browser, checked against the profile it names, and the PDF around it is checked for what ZUGFeRD asks of it (attachment name, relationship, XMP metadata, the declared profile matching the XML).

To write one, the e-invoice generator produces XRechnung (UBL or CII) and ZUGFeRD EN 16931 from a form, checks the result with the same rules before you download it, and makes the PDF for both.

More from the blog