What is XRechnung?
XRechnung is Germany's standard for invoices to the public sector: a pure XML document, no PDF layer, defined as the national usage specification (CIUS) of the European norm EN 16931 and maintained by KoSIT. Since the end of 2020, federal authorities require it, and the states have followed with their own portals; whoever supplies a German Behoerde invoices in XRechnung.
Pure XML is the point: public-sector invoice processing is fully automated, so the format optimizes for machines. Humans read an XRechnung through a viewer, not by opening the file.
One standard, two syntaxes
An XRechnung can be written in either of the two EN 16931 XML syntaxes: UN/CEFACT CII (the syntax ZUGFeRD also uses) or UBL. What makes the file an XRechnung is not the syntax but the declaration and the rules it satisfies. The declaration sits at the top:
<ram:GuidelineSpecifiedDocumentContextParameter>
<ram:ID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</ram:ID>
</ram:GuidelineSpecifiedDocumentContextParameter>
The German rules on top of EN 16931
The CIUS adds national business rules (the BR-DE series) that a plain EN 16931 invoice does not need. The ones that reject the most files in practice:
- The buyer reference (BT-10) must carry the Leitweg-ID; without it the invoice fails BR-DE-15 immediately.
- The seller must provide a contact with phone or email, so the authority can reach a human about the invoice.
- Both parties need an electronic address, and payment details must use the permitted means codes with the matching account data.
Every rule is machine-checked on receipt by the portals, which is why validating before sending is not optional in practice.
The Leitweg-ID, in one minute
The Leitweg-ID identifies the receiving authority's invoice inbox and routes your document to it, following the pattern {authority-id}-{optional-suffix}-{check-digit}. You receive it from the contracting authority, usually with the order. Ask for it before invoicing: it cannot be guessed, and its absence is the most common reason an XRechnung bounces.
How the file reaches the authority
Federal authorities receive through the OZG-RE platform (the older ZRE portal was switched off in September 2025), most states through state-specific platforms, and a growing share accept delivery over the Peppol network. The XML is identical on every route; only the transport differs.
XRechnung and ZUGFeRD
The two German formats split the market by recipient: XRechnung for authorities, ZUGFeRD for companies. They share the EN 16931 data model and the CII syntax, so the same invoice data can produce either file. For the hybrid B2B side, read the companion guide:
Sample files to download
All sample files live on their own page: the XRechnung in CII and UBL syntax, a deliberately invalid one that fails exactly rule BR-DE-15, plus one ZUGFeRD invoice per profile and the common special cases. Every card opens the file straight in the validator or the viewer. Browse and download all sample files.
Work with XRechnung files right here
- Create an XRechnung with the guided form, Leitweg-ID included
- Validate an XRechnung against EN 16931 and the CIUS rules
- Open an XRechnung and read it like a paper invoice
- Render an XRechnung as a shareable PDF
- Convert an existing PDF invoice to XRechnung
- Fix a rejected XRechnung in the editor
- Create an XRechnung credit note for an authority
- Convert an XRechnung between CII and UBL syntax