XRechnung: structure, mandatory fields and use
The XRechnung is the German standard for electronic invoices to public administration. It is a pure XML file without a visual view. Here is how it is built and what matters.
Updated on 28 October 2026
What the XRechnung is
The XRechnung is a data format for invoices. It implements the European norm EN 16931 for Germany and adds rules that public bodies need. An XRechnung consists of a single XML file. People do not see an invoice as on paper; software reads the fields and takes them over into accounting.
The file follows a fixed structure: header data, seller and buyer, payment details, line items and totals. Every field has a unique name and a number (business term, BT for short), so the receiving software knows exactly what a value means.
Two technical syntaxes: UBL and CII
The same content can be written in two XML languages: UBL (Universal Business Language) and CII (Cross Industry Invoice). Both are allowed. Which one your software creates usually does not matter to the recipient as long as it follows the XRechnung rules. A validator recognises the syntax by itself.
Which details are mandatory
The mandatory details are the same as for any invoice, plus some XRechnung specifics:
- Invoice number and date of issue
- Name and address of seller and buyer
- VAT identification number or tax number of the seller
- Line items with quantity, unit price, tax rate and net amount
- Totals: net, tax, gross and amount due
- Payment details, for example the IBAN
- The buyer reference, for public bodies the Leitweg-ID (BT-10)
- The specification identifier that states which XRechnung version the file is built to
Where the XRechnung is required
Public contracting authorities in Germany usually require the XRechnung for invoices to federal, state and municipal bodies. Invoices must be submitted through the designated receiving portals. Between businesses you may use XRechnung or ZUGFeRD as long as both sides can process them.
Create and validate
Most accounting programs can create XRechnungen. If you only need one occasionally, you can create it online from your details and validate it straight away. Check every file before sending: errors such as a missing Leitweg-ID or wrong totals make the recipient reject it.
Frequently asked questions
- Can I simply open an XRechnung?
- As a file you only see XML text. A tool that renders it as a readable PDF shows the invoice in the usual form.
- Is the XRechnung the same as an e-invoice?
- The XRechnung is one format of the e-invoice. There is also ZUGFeRD, for example. E-invoice is the umbrella term.
- Do I need a separate identifier for every authority?
- Yes, for public bodies the Leitweg-ID of the recipient belongs in the invoice. You get it from the contracting authority.
- Which version applies?
- The current version of the XRechnung specification applies. A good validator points out when the version does not fit.
Try it now
Check an e-invoice in a few seconds. Your file stays in the memory of a server in Germany only and is deleted after one hour at the latest.
More guides
- XRechnung or ZUGFeRD?
- Leitweg-ID explained
- The most important fields of an e-invoice
- ZUGFeRD: PDF with embedded XML
These guides do not replace tax or legal advice. For questions about your own case please ask your tax adviser.