What Is an XRechnung?
A clear guide to XRechnung, CII XML and EN 16931, including when businesses must send electronic invoices to German public authorities.
The XRechnung is the binding format for electronic invoices to public clients in Germany. Anyone who does business with authorities, municipalities or other public bodies will come across this term sooner or later. Many companies know that they should send “an e-invoice” - but what exactly an XRechnung is, what technical requirements are behind it and how it differs from other formats often remains unclear.
In this article we explain the XRechnung step by step: from the legal background to the technical structure to practical tips for everyday life. You can find more background on the entire topic on our E-Invoicing page and in the special overview of XRechnung.
What is an XRechnung?
A XRechnung is a structured electronic invoice in XML format that is created according to the German standard “XRechnung”. It is based on the European standard EN 16931 and technically uses the so-called CII-XML (Cross Industry Invoice). Unlike a PDF invoice, which is human-readable, the XRechnung contains all invoice data in machine-readable form - amounts, tax rates, service periods, payment information and recipient data are clearly structured.
In short
- Format: pure XML (CII), no embedded PDF view
- Target group: especially invoices to the public sector in Germany
- Standard: XRechnung specification based on EN 16931
- Transmission: via approved platforms or Peppol, not via simple email attachment
The XRechnung is therefore not a “special layout”, but a data exchange format. Accounting systems, invoice portals and authorities can automatically read, check and process the file - without manually transferring line items or amounts.
Why does the XRechnung exist?
The public sector in Germany processes millions of invoices every year. Paper and unstructured PDFs cause a lot of manual effort: employees have to type out data, correct errors and initiate approval processes manually. With the introduction of binding standards, this process should become automatable and auditable.
The XRechnung has been established as the national standard for invoices to public clients. It ensures that everyone involved uses the same structure - regardless of which software is used on the sender or receiver side. For companies, this means that anyone who delivers to authorities must know and comply with the technical specifications.
At the same time, the general e-invoice is becoming increasingly important in the B2B sector. The formats XRechnung and ZUGFeRD play different roles - more about this in our comparison article and on the ZUGFeRD page.
Technical structure: CII-XML explained clearly
At the core of an XRechnung is an XML file according to the CII schema (Cross Industry Invoice). This file contains logically grouped information:
Important areas in the XRechnung
| Area | Content | Example |
|---|
| Header data | Invoice number, date, currency | RE-2026-0042, 08/02/2026, EUR |
| Seller | Name, Address, USt-IdNr., Contact | Your company, street, tax number |
| Buyer | Authority, address, Leitweg-ID if applicable | City administration, Leitweg-ID |
| Line items | Quantity, description, unit price, VAT | 10 hours consultation at €120 |
| Buzz | Net, Tax, Gross | €1,200 net, €228 VAT, €1,428 gross |
| Payment | IBAN, purpose, due date | Payment term 14 days |
The Routing ID identifies the correct location and department for invoices to public clients. Without the correct Leitweg-ID, the invoice cannot be assigned in the recipient system - a common reason for rejections.
Validation and compliance
XRechnungs must be validatable against the official XRechnung specification. There are check rules (Schematron) that check mandatory fields and permitted values. Many invoicing software solutions and specialized tools automatically perform this check before shipping.
Practical tip: Save not only the XML file, but also a human-readable copy (e.g. PDF) in your accounting - even if the XRechnung itself does not contain a PDF. This means you remain able to act in the archive and during company audits.
XRechnung vs. PDF vs. ZUGFeRD
Not every digital invoice is an XRechnung. The differences are important:
| Feature | PDF invoice | ZUGFeRD | XRechnung |
|---|
| Human readable | yes | yes (PDF part) | no (XML only) |
| Machine readable | restricted | yes (XML embedded) | yes |
| Typical use | B2B, small businesses | B2B, mixed reception | public sector |
| Default | no e-invoice standard | EN 16931 / Factur-X | EN 16931 / XRechnung |
Anyone who only sends PDF invoices generally does not meet the requirements for a structured e-invoice in the sense of the public sector. For authorities, the XRechnung (or equivalent EN-16931 compliant route) is the usual route.
Who has to create XRechnungen?
The basic rule is: Invoices to public clients in Germany have had to be sent in a structured format for years - in practice often as XRechnung. Affected are suppliers, service providers and tradesmen who invoice orders from federal, state, local authorities or other public institutions.
Separate regulations regarding the e-invoicing requirement apply to the B2B sector. You should have a legal review of whether and when your company is affected - the transition periods and exceptions are complex. Our article on the E-Invoicing Mandatory 2026 and the FAQ provide an initial framework for orientation, but do not replace individual advice.
Typical situations in everyday life
- You have a framework agreement with a city administration and bill for services on a monthly basis.
- As an IT service provider, you deliver software to a state authority.
- You are billing a construction project for a public university.
In all cases: Leitweg-ID, correct tax information and valid XML are mandatory.
How is an XRechnung transmitted?
The XRechnung is generally not sent as a normal email attachment invoice. Common ways are:
- Federal or state invoice receipt platforms (e.g. ZRE, OZG-RE)
- Peppol network with corresponding connection
- Specialized portals of the respective authority or client
The client usually tells you which channel to use. You will often find references to electronic invoicing in the tender or contract. If this information is missing, ask the responsible clerk for it - before sending the first invoice.
Checklist before the first shipment
You can find detailed step-by-step instructions in our article Create XRechnung and in the guide Write an invoice.
XRechnung with Quotavo and suitable software
Many small and medium-sized companies today still use Word, Excel or simple PDF tools for invoices. That's not enough for XRechnungen. You need a solution that:
- Mandatory fields of XRechnung filled correctly
- stores the Leitweg-ID in the correct field
- a validable XML file is exported or transferred directly
- Harmonizes with your existing process (quotes, orders, accounting)
Modern invoicing software like Quotavo supports you, from classic invoice creation to compliant e-invoices. This means you don't have to familiarize yourself with XML schemas, but instead work with familiar masks - the system takes care of the technical output.
Common mistakes and how to avoid them
Incorrect or missing Leitweg-ID
The Leitweg-ID is not an optional additional field. Check the ID against the client's information - typos will result in rejection.
Incomplete tax information
USt-IdNr., tax rate and tax amount must be consistent. Differences between the position sum and the total amount are detected by validators.
Wrong format to wrong recipient
A XRechnung to a private B2B customer is often unnecessary; Conversely, a PDF sent to an authority is usually not enough. Clarify the format before the first invoice.
No archiving of the XML file
GoBD-compliant storage also applies to electronic invoices. Keep the original XML file unchanged.
You can find further answers to typical questions in our FAQ.
Frequently asked questions (FAQ)
Is XRechnung the same as e-invoicing?
E-invoice is the generic term for structured electronic invoices according to EN 16931. XRechnung is the German specification of this – especially for invoices to the public sector. Not every e-invoice is an XRechnung (ZUGFeRD also exists), but XRechnung is a fully fledged e-invoice under the law. More about the overview: E-Invoicing.
Can I send an XRechnung as a PDF?
No. XRechnung is pure XML (CII format) – not a readable PDF interface. Public sector recipients expect the XML file via Portal or Peppol, not a PDF as a replacement. For customers who want to view PDF, ZUGFeRD is the hybrid format; send XRechnung to authorities.
Where can I find the Leitweg-ID?
The public client will inform you of the Leitweg-ID - in the tender, in the contract or on the authority's billing information page. It is unique for each recipient location. Without a correct Leitweg-ID, the invoice will be rejected. Details: Leitweg-ID explained.
Do I also need XRechnung for private customers?
Generally no. XRechnung is intended for public clients in Germany. Private and normal B2B customers can use other formats - in the future often ZUGFeRD as part of the B2B e-invoicing requirement. Clarify the format per customer before the first shipment.
How do I check if my XRechnung is valid?
Use an official validator, such as the KoSIT validator for XRechnung. Upload the generated XML file; the validator reports schema and rule violations. Your invoicing software should also check before exporting. Instructions: Create XRechnung.
What happens if my XRechnung is rejected?
Typical reasons: incorrect Leitweg-ID, validation errors, incorrect submission portal, missing mandatory fields. You will usually receive an error message from the portal. Correct the invoice, if necessary increase the invoice number only according to internal cancellation logic and send a corrected XRechnung. Processes for this in Write an invoice and FAQ.
Conclusion: XRechnung as a standard for the public sector
The XRechnung is the central format for structured invoices to public clients in Germany. It is based on CII-XML and EN 16931, enables automatic processing and requires clear technical rules. Anyone who works with authorities should clarify Leitweg-ID, validation and transmission route at an early stage.
For general B2B trade, other formats and deadlines also come into play - find out more on our pages about E-Invoicing, XRechnung and ZUGFeRD, and have your specific obligations legally checked if necessary. With the right software and a little preparation, the XRechnung becomes a normal, easy-to-automate step in day-to-day business - instead of a nasty surprise with the first government invoice.