What Is XRechnung? Format, Structure and Requirements (2026)
What is XRechnung? Germany's XML e-invoice format under EN 16931 explained: how it is structured, when it is mandatory and how to validate and create one.
Key takeaways
- XRechnung is a pure XML invoice based on EN 16931 with German business rules (BR-DE), published by KoSIT in two syntaxes: UBL 2.1 and UN/CEFACT CII.
- Suppliers to German federal authorities have had to invoice electronically since 27 November 2020; the standard is XRechnung, submitted via the OZG-RE platform.
- For domestic B2B invoices, XRechnung has been one permitted e-invoice format since 1 January 2025, alongside ZUGFeRD 2.0.1 or later (except the MINIMUM and BASIC WL profiles).
- The current release is XRechnung 3.0.2; version 3.0 stays in force until at least 31 July 2027, and a pre-release of XRechnung 4.0 appeared in September 2026.
- Every XRechnung needs a buyer reference in BT-10 (rule BR-DE-15); for public authorities this field carries the Leitweg-ID.
On this page
XRechnung is Germany's standard for electronic invoices: a pure XML file based on the European standard EN 16931, extended with national business rules. KoSIT publishes it on behalf of the IT Planning Council in two syntaxes, UBL and CII. Federal authorities have required it since 27 November 2020, and since 2025 it has been a permitted B2B e-invoice format.
Last reviewed: September 2026. This article is general information, not tax advice.
What exactly is XRechnung?
Technically, XRechnung is a CIUS (Core Invoice Usage Specification) of EN 16931. The standard defines a European data model for invoices. A CIUS narrows that model for a specific use and adds rules. For XRechnung these are the business rules prefixed BR-DE, for example the requirement to state a seller contact or a buyer reference.
The publisher is the Coordination Office for IT Standards (KoSIT) in Bremen, which works on behalf of the IT Planning Council (IT-Planungsrat), the body that coordinates IT between the federal government and the states. KoSIT decides which fields are mandatory, maintains the validation rules and releases new versions.
An XRechnung always uses one of two XML syntaxes:
- UBL 2.1 (OASIS Universal Business Language), root element
InvoiceorCreditNote. - CII (UN/CEFACT Cross Industry Invoice), root element
rsm:CrossIndustryInvoice.
Both carry the same content and are legally equivalent. There is no visual layer like a PDF. To read the invoice, you need software that renders the data.
The main users are suppliers to public-sector buyers, authorities that post incoming invoices automatically, and a growing number of companies that move their bookkeeping to structured data. Foreign suppliers can use it too; according to KoSIT, German authorities that are reachable via Peppol also process Peppol BIS Billing 3.0 invoices from suppliers outside Germany.
XRechnung vs. e-invoice: what is the difference?
"E-invoice" (E-Rechnung) is the legal term. Under § 14 UStG (opens in a new tab) (German VAT Act), an e-invoice is issued, transmitted and received in a structured electronic format that allows electronic processing. The format must comply with EN 16931, or be agreed between the parties if it allows correct and complete extraction of the data (EDI, for example).
XRechnung is one format that meets this definition. A PDF, a scan or an invoice typed into an email body is an "other invoice" (sonstige Rechnung). The page XRechnung vs. PDF invoice compares the two directly.
Is XRechnung mandatory?
Whether you must use XRechnung depends on who receives the invoice:
| Recipient | Obligation since | Format |
|---|---|---|
| Federal authorities (B2G) | 27 Nov 2020 (E-RechV) | XRechnung is the standard; ZUGFeRD in the XRECHNUNG profile is also accepted |
| States and municipalities | varies by state | usually XRechnung; details depend on state law |
| Domestic businesses (B2B) | receiving since 1 Jan 2025, issuing phased in until 2028 | any EN 16931 format: XRechnung, ZUGFeRD 2.0.1+ (except MINIMUM and BASIC WL) or agreed EDI |
| Private consumers (B2C) | no e-invoice obligation | paper or PDF remain allowed |
For the federal level, the FAQ of the federal invoice platform (opens in a new tab) names XRechnung in its valid version as the standard. Other formats are allowed if they meet EN 16931, the E-RechV and the platform's terms of use. It explicitly names ZUGFeRD in the XRECHNUNG profile, which is submitted there as a pure XML file. Direct awards (Direktaufträge) up to €1,000 are exempt under § 3(3) E-RechV.
For B2B, the law requires an e-invoice but no particular format. Since 1 January 2025, every business established in Germany must be able to receive e-invoices; an ordinary email inbox is enough. Transition rules for issuing run until the end of 2027. Deadlines, exemptions and the €800,000 turnover threshold for 2027 are covered in our guide to Germany's e-invoicing mandate.
How is an XRechnung structured?
EN 16931 defines every piece of invoice information as a business term (BT) with a fixed number. Related terms form a business group (BG), such as BG-4 for the seller or BG-25 for an invoice line. These numbers do not depend on the syntax: BT-10 is cbc:BuyerReference in UBL and ram:BuyerReference in CII, but it is the same field. When you read error messages or build an integration, the BT numbers are the common language.
The key fields of an XRechnung 3.0:
| Field | Meaning | Note |
|---|---|---|
| BT-1 | Invoice number | unique, assigned by the seller |
| BT-2 | Issue date | YYYY-MM-DD in UBL, YYYYMMDD in CII |
| BT-3 | Invoice type code | e.g. 380 invoice, 381 credit note, 384 corrected invoice (BR-DE-17) |
| BT-5 | Currency | ISO 4217 code, "EUR" rather than "€" |
| BT-10 | Buyer reference | mandatory in every XRechnung (BR-DE-15); the Leitweg-ID for authorities |
| BT-23 | Business process type | mandatory since XRechnung 3.0 |
| BT-24 | Specification identifier | urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0 |
| BT-27, BT-31/BT-32 | Seller name and VAT ID or tax number | the tax number is also a VAT-law requirement |
| BT-34, BT-49 | Electronic address of seller and buyer | e.g. an email address; mandatory since 3.0 |
| BG-6 (BT-41 to BT-43) | Seller contact | name, phone, email |
| BT-44 | Buyer name | plus city, postcode and country |
| BG-16 | Payment instructions | payment means (BT-81), IBAN for transfers (BT-84) |
| BG-25 | Invoice lines | quantity (BT-129), unit (BT-130), net amount (BT-131), item name (BT-153) |
| BG-23 | VAT breakdown | taxable amount, tax amount, category, rate |
| BT-112 | Total including VAT | net total plus VAT |
| BT-115 | Amount due | total minus amounts already paid |
The rules also check arithmetic. Line amounts must add up to BT-106 (BR-CO-10), the gross total must equal net plus VAT (BR-CO-15), and the amount due must match any prepayments (BR-CO-16).
This is what the header of an XRechnung looks like in UBL (shortened; the Leitweg-ID is fictitious):
<ubl:Invoice xmlns:ubl="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>RE-2026-0142</cbc:ID>
<cbc:IssueDate>2026-09-28</cbc:IssueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>991-12345-73</cbc:BuyerReference>
<!-- seller, buyer, payment, VAT, totals, lines -->
</ubl:Invoice>
A complete sample file is available as an XRechnung example. The comparison UBL vs. CII explains how the two syntaxes differ, and our developer guide to the XRechnung XML structure maps the element paths.
Which XRechnung version applies?
Version 3.0 has applied since 1 February 2024 and stays in force until at least 31 July 2027. The current release is XRechnung 3.0.2; the latest bundle, "3.0.2 Summer 2026 Bugfix", dates from 31 August 2026. Bugfix bundles correct validation rules and tooling but do not change the specification identifier in BT-24.
In September 2026 KoSIT published a pre-release of XRechnung 4.0. The final version is expected in spring 2027. According to the federal FAQ, changes to the standard are announced six months before they take effect. The KoSIT versions and bundles page (opens in a new tab) lists every release.
How do you open, validate and create an XRechnung?
Open and read
In a text editor an XRechnung is a wall of nested XML elements. It only becomes readable through a visualisation. Our XRechnung viewer lets you drop in an XML file and renders UBL and CII as a clear invoice. For a ZUGFeRD invoice, first extract the XML from the PDF, then open that XML in the viewer. The tool works online and needs no installation. KoSIT also provides its own XSLT-based visualisation that developers can build into their applications.
Validate
A full check has three layers: the XML is validated against the schema (XSD) of its syntax, then against the EN 16931 Schematron rules, and finally against the XRechnung rules (BR-DE). The same viewer works as an e-invoice validator: it applies the official KoSIT rules for EN 16931 and XRechnung 3.0 and explains each message. Individual codes are listed under XRechnung validation errors, and our guide on how to fix XRechnung validation errors covers the most common causes.
The German Federal Ministry of Finance (BMF) letter of 15 October 2025 distinguishes three types of error. A format error means the file does not match the permitted syntax; it then does not count as an e-invoice. A business-rule error breaks the rules of the format; if it does not affect VAT details, as with a missing BT-10, it is irrelevant for VAT. A content error means mandatory VAT details under § 14(4) UStG are missing or wrong, for example an incorrect tax rate. That puts input VAT deduction at risk even if technical validation passes. Keep the validation report as evidence.
Create
There are several ways to create one. Many invoicing and accounting programs export XRechnung directly. Without your own software, you can create an e-invoice with our generator, which produces XRechnung in UBL syntax as well as ZUGFeRD invoices, with no installation and no sign-up. For invoices to federal authorities, the OZG-RE platform also offers a web form (Weberfassung) for manual entry. Developers write the XML themselves. The individual steps are covered in our guide on how to create an XRechnung step by step.
The Leitweg-ID: the address for public-sector invoices
For invoices to public-sector buyers, BT-10 carries the Leitweg-ID (routing ID). It makes sure the invoice reaches the right office. A Leitweg-ID has a coarse address (2 to 12 digits), an optional fine address (up to 30 characters) and a two-digit check number, separated by hyphens. At federal level the coarse address starts with 991, 992 or 993.
The contracting authority assigns the ID, and you receive it with the order or contract. Suppliers do not need a Leitweg-ID of their own, not even for B2B invoices. Before sending, you can run the ID through our Leitweg-ID validator, which checks the format and check digits. The error "Leitweg-ID ist nicht valide" (Leitweg-ID not valid) is often caused by misplaced hyphens or leading or trailing spaces. Read more in What is a Leitweg-ID?.
How is an XRechnung delivered?
Since 19 September 2025 the federal administration has a single platform: the former ZRE was switched off and merged into the OZG-RE. There you submit invoices via web form, upload, email or Peppol. First register on the OZG-RE (with an OZG-RE account or the ELSTER-based 'Mein Unternehmenskonto') and activate the channels you want to use; registration and use are free for suppliers. The Peppol participant ID of a connected recipient is "0204:" followed by the Leitweg-ID. States and municipalities run their own portals with their own rules.
In B2B, sending the XML as an email attachment to the customer's invoice address is usually enough. Larger companies also use Peppol or supplier portals.
Supporting documents such as timesheets or delivery notes are embedded in the XRechnung as Base64 (BG-24) instead of being attached separately. The mandatory details must still be in the XML itself. Our guide to XRechnung attachments shows how.
How long must you keep an XRechnung?
Since 2025, invoices must be kept for eight years (§ 14b UStG, § 147 AO), counted from the end of the calendar year. For an e-invoice, at least the structured part must be kept unaltered in its original format. A printout or PDF rendering does not replace the XML file. The additional GoBD requirements (German principles for proper digital bookkeeping) are explained in our guide to e-invoice archiving.
XRechnung or ZUGFeRD?
XRechnung is a pure XML file. ZUGFeRD is a hybrid: a PDF/A-3 with embedded CII XML that people can read and software can process. Both are permitted for B2B, while XRechnung is the standard for federal authorities. The comparison XRechnung vs. ZUGFeRD shows when each fits, and our article What is ZUGFeRD? explains profiles and versions.
More articles on the Leitweg-ID, creating and validating invoices are collected in the XRechnung category.
Tools for this article
- XRechnung ViewerParse, validate & repair German e-invoices with GoBD-compliant audit trail.Open tool →
- E-Invoice GeneratorCreate compliant XRechnung XML and ZUGFeRD hybrid PDF invoices instantly.Open tool →
- Leitweg-ID Validator & Check-Digit CalculatorValidate Leitweg-IDs and calculate ISO 7064 Mod 97-10 check digits.Open tool →
Frequently asked questions
Is XRechnung mandatory in Germany?
For invoices to federal authorities, yes: the federal e-invoicing ordinance (E-RechV) has applied since 27 November 2020 and XRechnung is the standard. States and municipalities set their own rules. For domestic B2B invoices, German law has required an e-invoice under EN 16931 since 2025, but no specific format. XRechnung is one permitted option; ZUGFeRD 2.0.1 or later (except MINIMUM and BASIC WL) is another.
Is XRechnung the same as an e-invoice?
No. E-invoice (E-Rechnung) is the legal term in § 14 UStG: an invoice in a structured electronic format that complies with EN 16931. XRechnung is one concrete format that meets this definition; ZUGFeRD from version 2.0.1 is another. A plain PDF is not an e-invoice under German law. It counts as an 'other invoice' (sonstige Rechnung), even when it is sent by email.
What is the current XRechnung version?
The current release is XRechnung 3.0.2. The latest bundle, '3.0.2 Summer 2026 Bugfix', was published on 31 August 2026. Version 3.0 has applied since 1 February 2024 and stays in force until at least 31 July 2027. KoSIT published a pre-release of XRechnung 4.0 in September 2026, and the final version is expected in spring 2027.
How can I open and read an XRechnung file?
An XRechnung is an XML file without a visual layer, so a text editor only shows nested elements. To read it as an invoice you need a visualisation tool. The docutools.pro XRechnung viewer renders UBL and CII files as a readable invoice and checks them against the official KoSIT rules at the same time. KoSIT also publishes its own XSLT-based visualisation.
Do I need a Leitweg-ID to send an XRechnung to a company?
No. Public contracting authorities assign Leitweg-IDs so that invoices reach the right internal office. In B2B invoicing, neither the supplier nor the customer needs one. The buyer reference field (BT-10) must still be filled in every XRechnung, so enter another reference there, such as the purchase order number or cost centre your customer gives you.