XRechnung
XRechnung is a purely structured XML invoice format that implements the European standard EN 16931 and serves as the German standard for electronic invoices to public authorities – with no visible image representation, but fully machine-processable.
XRechnung is a purely structured, XML-based invoice format that turns the European standard EN 16931 into a binding German standard. It contains every invoice detail – invoice number, line items, tax amounts, routing ID (Leitweg-ID), payment data – as a machine-readable data set and no image representation. In Germany, XRechnung is the definitive standard for electronic invoices to public authorities (B2G) and, at the same time, one of the two common formats companies use to meet the B2B e-invoicing mandate in force since 2025.
The standard is maintained by KoSIT (the Coordination Office for IT Standards) on behalf of the IT Planning Council. Unlike a PDF – readable for humans but only an image to software – XRechnung delivers its data in clearly defined fields. A receiving system can therefore read it without manual entry, match it against purchase order and goods receipt, and post it automatically. XRechnung describes the format of the document – not the transmission channel.
At a glance
- Purely structured XML format – no PDF, no visible image representation
- Implementation of the EU standard EN 16931 as a binding German standard (CIUS)
- Mandatory format for invoices to federal public authorities (B2G)
- Maintained by KoSIT; supports UBL and UN/CEFACT CII as syntax
- Needs a viewer or a visualization in the ERP to be displayed
What defines XRechnung
XRechnung is not a data model of its own but a national specification of the EN 16931 standard – in technical terms a "Core Invoice Usage Specification" (CIUS). It defines which of the fields provided for by the standard are to be used in Germany specifically, which must additionally be filled as mandatory, and which business rules apply. XRechnung is thus a binding manifestation of the European invoice standard for the German context.
A defining trait is the absence of any image representation: an XRechnung consists solely of the structured data set. Anyone who wants to read it needs a viewer that translates the XML data into a human-readable view – for example the freely available standard viewer or the visualization in their own ERP. This design makes XRechnung maximally automatable, but requires software on the receiving side that can process the format.
Structure and technical components
Technically, XRechnung is based on the semantic data model of EN 16931: the standard defines the invoice content and its meaning, while XRechnung prescribes its German usage. Two variants are permitted for the concrete XML syntax.
UBL and UN/CEFACT CII as syntax
An XRechnung can be issued as UBL (Universal Business Language) or as UN/CEFACT CII (Cross Industry Invoice). Both are equivalent XML syntaxes that map the same semantic model; a standard-compliant receiving system must be able to process both. For humans, the raw data is meaningfully readable in either case only with a display program.
Leitweg-ID and mandatory details
A field typical for Germany is the Leitweg-ID (routing ID): it uniquely addresses the receiving authority and is mandatory for B2G invoices. On top of that come further details marked as mandatory in the specification, such as buyer reference, payment terms, and itemized tax amounts. If these are missing or violate one of the stored business rules, the invoice is rejected during validation.
Why XRechnung matters
The benefit of XRechnung lies in continuous, media-break-free processing. Because every detail sits in a defined field, retyping from PDF or paper disappears, as does error-prone text recognition (OCR). Invoices can be checked, coded, and posted automatically – this lowers processing costs, speeds up throughput times, and improves data quality in accounting.
Legally, XRechnung has been the standard for invoices to federal authorities since 27 November 2020: anyone supplying the federal government must invoice electronically and, as a rule, as XRechnung. With the B2B e-invoicing mandate from 2025, the format gains additional importance, because it is one of the two practically relevant formats with which invoices between companies can also be issued in a standard-compliant way.
XRechnung in the ERP system
For an ERP system, XRechnung is both an outbound and an inbound topic. On the outbound side, the system generates a standard-compliant XML file directly from the sales document: the relevant data – customer account, line items, tax codes, payment terms, and where applicable the Leitweg-ID – already resides in the master data and in the document, so the XRechnung is created without extra effort provided the tax logic and mandatory fields are maintained correctly. Transmission then takes place via email, a government portal, or a network such as PEPPOL.
The real efficiency lever lies on the inbound side: incoming XRechnungen are read in automatically, assigned to the open purchase orders, and checked in the invoice workflow. Approval, account assignment, and handover to financial accounting or the tax advisor run largely without manual entry. Audit-proof, GoBD-compliant archiving is essential: the XRechnung must be retained in its original format in an unalterable way. Many systems handle this via a DATEV interface and an integrated document archive and provide a readable visualization for visual inspection.
Distinction: XRechnung, ZUGFeRD and e-invoice
The terms XRechnung, ZUGFeRD, and e-invoice are often conflated but mean different things. "E-invoice" is the umbrella term for any structured invoice compliant with EN 16931. XRechnung and ZUGFeRD are two concrete formats within it.
The decisive difference between the two: XRechnung is a pure XML format without a visible representation – the recipient needs a viewer. ZUGFeRD, by contrast, is a hybrid format that embeds the XML data set in a PDF/A-3 file; the recipient sees a readable PDF while software simultaneously evaluates the embedded data. For invoices to public authorities, XRechnung is the required standard; in B2B, both formats are used. To be distinguished from both is the classic EDI exchange (such as EDIFACT), which remains permissible as long as the invoice data is interoperable with EN 16931.
DACH specifics
XRechnung is a specifically German standard and has no direct counterpart in Austria or Switzerland. In Austria, invoices to the federal administration have had to be submitted electronically since 2014; the usual choices are the ebInterface format or a PEPPOL invoice via the Business Service Portal (USP); a general B2B mandate as in Germany does not exist there. As a non-EU country, Switzerland is not bound by the EU standard and uses its own requirements and established invoice networks for the public sector.
Anyone invoicing across borders should therefore check which format is required in the destination country. An ERP that masters several e-invoice formats and comes with a PEPPOL connection makes this considerably easier. This article gives a general overview and does not replace individual tax advice.
Example
Example: a mid-sized company supplies a federal authority
A mid-sized equipment supplier wins a federal tender and must issue its invoices as XRechnung from now on. In the ERP, it stores the Leitweg-ID provided by the authority on the customer master and activates the XRechnung outbound format. When invoicing, the system automatically generates an EN 16931-compliant XML file from the sales document and transmits it via the federal government's central invoice receipt platform.
Before sending, the ERP checks the invoice against the stored business rules – if a mandatory detail is missing or the tax presentation does not fit, the document is not even transmitted but held back for correction. In this way, the company avoids rejections, shortens its payment terms, and archives every XRechnung audit-proof in its original format for the later tax audit.
Frequently asked questions
Matching ERP systems
Related services
Questions about XRechnung in your ERP project?
We advise vendor-neutrally – and implement it ourselves on request.