Compliance
What is XRechnung? A plain-English guide for 2026
What is XRechnung? A plain-English guide for 2026
If your business invoices German federal authorities, or plans to, you have probably heard the word XRechnung. This guide covers what it is, who needs it, how it relates to EN 16931 and ZUGFeRD, and what a compliant invoice must contain.
What XRechnung actually is
XRechnung is the German public-sector e-invoice format. It is a CIUS, a country-specific customization of the European e-invoicing standard EN 16931. EN 16931 defines the European baseline every compliant e-invoice must meet. XRechnung adds German-specific rules on top of it.
XRechnung is an XML format. A XRechnung invoice is a machine-readable CII XML file that a recipient's system parses directly. There is no human-readable PDF page. If you need a hybrid PDF with embedded XML, the German equivalent is ZUGFeRD. The two share the same underlying data model.
Who publishes and maintains it
XRechnung is published and maintained by KoSIT, the German federal Coordination Office for IT Standards. KoSIT publishes the standard itself plus the validation artifacts: an XSD schema and a Schematron rule set. A XRechnung invoice must pass both to be considered valid.
Who needs XRechnung
XRechnung is mandatory for invoices to German federal authorities and is increasingly required by German states (Länder) and municipalities. Since the EU's e-invoicing directive was transposed into German law, public-sector buyers must accept structured e-invoices, and XRechnung is the format they accept.
For B2B invoices, Germany's growing e-invoicing mandate is built on the same EN 16931 foundation. Even where XRechnung itself is not the required format, the data model and rules it codifies are the reference point German e-invoicing compliance is measured against.
How XRechnung relates to EN 16931 and ZUGFeRD
The three names get used together a lot, and the relationship matters.
EN 16931 is the European standard. It defines the content of an e-invoice: which fields it must carry and the rules they must satisfy. It is syntax-agnostic, so the same data can be serialized as CII XML or UBL XML.
XRechnung is the German CIUS of EN 16931. It takes the EN 16931 data model and adds German rules, for example a required buyer reference called the Leitweg-ID. It is serialized as CII XML.
ZUGFeRD is a German format that ships a human-readable PDF/A-3 with the same CII XML embedded inside it. ZUGFeRD and XRechnung share the EN 16931 data model. The difference is the container: PDF plus XML for ZUGFeRD, XML only for XRechnung.
What a compliant XRechnung invoice must contain
A XRechnung invoice must satisfy every EN 16931 BR (business rule) plus the German-specific rules the CIUS adds. At a minimum, a compliant invoice carries:
- An invoice number (BT-1) and issue date (BT-2)
- Seller details: name, address, and a tax registration number (BT-32)
- Buyer details, including the buyer reference
- A buyer reference. For public-sector invoices this is the Leitweg-ID, the German routing identifier that delivers the invoice to the right recipient system
- One or more line items (BG-32), each with a description, quantity, and price
- The VAT breakdown and the payment amount due
The Leitweg-ID, in plain terms
The Leitweg-ID is the German public-sector buyer reference. Think of it as a
delivery address for an electronic invoice. It tells the recipient's system
where to route the document. XRechnung's German rules require it to be present
and non-blank (this is the BR-DE-15 rule). The rule checks presence only,
not format or a checksum. The format validation gap is an industry-wide
limitation in the standard KoSIT tooling, not an InvoiceSpec quirk.
How InvoiceSpec handles XRechnung
InvoiceSpec generates XRechnung as CII XML from a single canonical invoice JSON request, then validates the result against the KoSIT XSD and Schematron rules before returning it. You send one JSON payload and get back a XRechnung XML file that passes the same validation the recipient's system will run.
You can try it without an account using the free XRechnung Generator, or read the XRechnung API reference to generate and validate invoices programmatically.
Frequently asked questions
Is XRechnung the same as EN 16931?
No. EN 16931 is the European standard. XRechnung is the German customization of it. Every XRechnung invoice conforms to EN 16931, but an EN 16931 invoice is only a valid XRechnung invoice if it also satisfies the German rules XRechnung adds on top.
Is XRechnung a PDF?
No. XRechnung is an XML format. If you need a human-readable PDF with machine-readable XML embedded inside it, the German format for that is ZUGFeRD, which shares the same underlying data model.
Do I need a Leitweg-ID for every invoice?
You need a buyer reference for XRechnung invoices. For public-sector recipients, that reference is the Leitweg-ID. For private-sector recipients, the buyer reference requirement depends on the recipient and the agreed process.
Start issuing compliant XRechnung invoices
You can generate your first compliant XRechnung XML in minutes. Create a free account and send a valid invoice with one API call, or try the free generator with no signup. InvoiceSpec handles the EN 16931 rules and the KoSIT validation so you don't have to maintain that logic in-house.
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
Compliance
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