XRechnung e-Invoicing Format - How to Create, Examples, Specifications


XRechnung is structured XML e-invoice standard in Germany, based on the European standard EN 16931. Unlike a conventional PDF invoice, it provides machine-readable invoice data that accounting systems can receive and process electronically. The standard is maintained by the Coordination Office for IT Standards, KoSIT. XRechnung.

XRechnung is particularly important for invoicing public-sector customers. It's also accepted for domestic B2B e-invoicing in Germany. This guide explains how XRechnung works, how to create, validate, send and archive an invoice, what to look for in software, and when the relevant German e-invoicing obligations apply.

Key takeaways

  • XRechnung is structured XML, not a conventional PDF. 
  • XRechnung has been mandatory in the B2G sector (invoices to public bodies) since November 2020.
  • It's default standard under the federal E-Rechnungsverordnung, which also permits other formats meeting the European standard.
  • From 2025, the B2B e-invoicing obligation in Germany begins, with transitional periods through 2028.
  • Its technical basis is a CIUS (Core Invoice Usage Specification) of EN 16931, with additional mandatory fields such as the Leitweg-ID.

What is an XRechnung?

XRechnung is the legal and technical standard for sending invoices as structured XML data instead of unstructured documents according to the official e-invoicing guidelines published by the German Federal Tax Authority (Bundeszentralamt für Steuern). It is a machine-readable XML invoice designed so accounting and public procurement systems can automatically read, validate, route, and process invoice data.

XRechnung was introduced as Germany’s implementation of the European e-invoicing standard EN 16931 and became the core format for invoicing the public sector (B2G). That means if a supplier invoices many German authorities, the invoice usually has to be sent in this structured format rather than as a normal PDF.

A simple way to understand it:

  • Purpose: standardize invoice data so systems can exchange it automatically
  • Format: XML, usually using UBL 2.1 or UN/CEFACT CII syntax
  • Use case: especially mandatory for public authorities, and increasingly relevant for B2B e-invoicing in Germany
  • Key requirement: it includes strict mandatory fields such as invoice details, tax data, and often the Leitweg-ID for public-sector routing

How does XRechnung work?

XRechnung works by turning invoice details into a structured XML file that systems can read, validate, send, and process automatically. It uses machine-readable data so invoices can move directly from the seller’s system into the buyer’s ERP or accounts payable workflow. This reduces manual entry, speeds approvals, and lowers rejection risk.

  • Data capture: The seller enters all required invoice details, including legal and tax information. For public-sector invoices, the Leitweg-ID is crucial because it helps route the invoice correctly.
  • XML creation: The billing system generates an XRechnung XML file in a compliant syntax such as UBL or CII.
  • Validation: The file is checked against official XRechnung rules. Missing fields or format errors can cause rejection.
  • Transmission: The XML is sent through approved channels such as portals, email, Peppol, or EDI-related workflows.
  • Receipt and processing: The buyer’s system receives the XML, validates it again if needed, and imports it for approval and payment.
  • Archiving: Both seller and buyer must store the invoice electronically for record-keeping.

XRechnung Format: Technical Specification 

XRechnung is based on the EN 16931 standard and is a German CIUS (Core Invoice Usage Specification).

Feature

Description

File format

XML

Syntax

UBL 2.1

Standard

EN 16931

Extension

German CIUS (XRechnung)

Version

currently 3.x

Mandatory information in the XRechnung format

XRechnung contains all mandatory information pursuant to Section 14 of the German VAT Act (UStG), as well as additional routing data.

Essential mandatory fields: 

  • Invoice number
  • Invoice date
  • Delivery date
  • Name and address of supplier and recipient of the service
  • VAT ID or tax number
  • Description of services/goods
  • Net, tax, and gross amounts
  • Tax rate
  • Payment terms
  • Leitweg-ID (mandatory in B2G)

If one of these fields is missing, the XRechnung is rejected by the system.

XRechnung Format Example (XML)

An XRechnung consists of structured XML tags. Below is a simplified XRechnung XML example:

<Invoice>

  <cbc:ID>INV-2025-001</cbc:ID>

  <cbc:IssueDate>2025-01-15</cbc:IssueDate>

  <cac:AccountingSupplierParty>

    <cac:Party>

      <cbc:Name>Mustermann GmbH</cbc:Name>

      <cbc:CompanyID>DE123456789</cbc:CompanyID>

    </cac:Party>

  </cac:AccountingSupplierParty>

  <cac:AccountingCustomerParty>

    <cac:Party>

      <cbc:EndpointID>Leitweg-ID-12345</cbc:EndpointID>

    </cac:Party>

  </cac:AccountingCustomerParty>

</Invoice>

Important: An XRechnung does not contain a PDF component (difference from ZUGFeRD).

How to Generate an XRechnung Invoice: Step-by-Step Guide

To create and transmit an XRechnung, companies need suitable software solutions and a validated transmission channel.

Step 1: Confirm the recipient’s requirements

Evaluate if you are invoicing a business or a public authority. For a federal public-sector customer, plan on obtaining its invoicing instructions and Leitweg-ID. Never make an assumption that every public authority may need the same submission requirements. Distinguish between the federal and Länder requirements.

Step 2: Prepare the invoice data

Collect the supplier and customer details, invoice number and date, description of the goods or services, relevant supply information, amounts and applicable VAT details. The VAT-required invoice information must be available in the structured invoice data.

Step 3: Generate the XRechnung XML

Create the invoice using your ERP system, or an accounting application or an e-invoicing compliance software. The standard supports UBL and UN/CEFACT CII syntax; the sender can use either supported syntax. Select a software which can support the applicable XRechnung specification and recipient requirements.

Step 4: Validate before dispatch

Generated file must be checked against the XML schema and EN 16931/XRechnung business rules. It must be reviewed for validation, and correct the errors, if any, and run validation again.

How to Send and Archive an XRechnung Invoice

XRechnung invoice exchange requires using appropriate channel, check status and resolve exceptions etc.

Step 1: Use an appropriate channel to send

For domestic B2B invoices, options to send an invoice include email, electronic interfaces and invoice portals. You need to agree on the practical delivery method with your customer.

Step 2: Check submission status and resolve rejections

Review any available delivery or processing notifications. If an invoice is rejected, learn about the reason to know the problem. Correct the issue and revalidate the invoice before resubmission. This is a practical way to control the workflow.

Step 3: Archive the original XML

Preserve the original structured invoice data intact as required under the VAT retention rule in § 14b(1) UStG. The copies of incoming and outgoing invoices must be retained for eight years.
 

e-Invoicing and XRechnung obligation in Germany

In the B2G sector, XRechnung has been mandatory since November 2020. It applies to all suppliers issuing invoices to federal authorities.

In the B2B sector, mandatory implementation begins gradually from 2025. Initially, there is an obligation to receive invoices; from 2027, an obligation to issue invoices applies for companies with annual turnover above €800,000; and from 2028, for all companies:

B2G (Business-to-Government)

  • Mandatory since November 2020
  • Applies to invoices sent to federal authorities
  • Affects all suppliers to public contracting authorities

B2B (Business-to-Business)

From 2025, the e-invoicing obligation in B2B begins:

  • 2025: obligation to receive
  • 2027: obligation for companies with turnover > €800,000
  • 2028: obligation for all companies

Best XRechnung Software in Germany

For Germany e-invoicing you will need the best XRechnung software. It should fit your invoice volume of your business, accounting setup and customers’ submission requirements. Evaluate the complete workflow, not just whether a tool can export an XML file.

Use this selection checklist to find the best e-invoicing platform:

  • Can it generate XRechnung invoices using the applicable specification?
  • Does it validate schema and business rules and provide actionable reports?
  • Can it use existing system and invoice data from your ERP without unnecessary re-entry?
  • Can it handle the information and delivery process your customers require?
  • Can users do visualisation of invoices in a readable form?
  • Can your team investigate rejected invoices and manage corrections?
  • Can you preserve and retrieve the original XML alongside relevant supporting records?
  • How are specification and validation updates managed?

XRechnung software providers like ClearTax ensure correctly generation of business, validate, and archive structured XML data. ClearTax's platforam also reject the incorrect invoices automatically, which otherwise delays payment processes.

XRechnung vs ZUGFeRD: Key Differences and Best Use Cases

XRechnung and ZUGFeRD are both based on EN 16931, but they are designed for different practical needs. XRechnung is a pure XML invoice format built for strict machine processing and is the mandatory standard for many B2G invoices in Germany. ZUGFeRD, by contrast, is a hybrid format that combines a human-readable PDF with embedded XML, making it especially useful in B2B scenarios where both people and systems need to read the invoice. 

Conclusion

The introduction of XRechnung changes not only the invoice format, but the entire invoice processing workflow. Companies must ensure that their systems can correctly generate, validate, and archive structured XML data. Incorrect invoices are automatically rejected, which delays payment processes. A technically clean implementation reduces rejection rates, accelerates cash flow, and minimizes tax risks within the framework of increasing digital oversight.

Frequently Asked Questions

What is XRechnung standard?

The XRechnung standard is an EN 16931-compliant XML invoice without a PDF component that contains all mandatory fields, including the Leitweg-ID.

How do I create an XRechnung?

With an ERP system or e-invoicing tool that generates XML in UBL format and validates it against EN 16931.

Is an XRechnung an e-invoice?

Yes. XRechnung is a legally recognized structured e-invoicing format.

What requirements apply to an XRechnung?

An XRechnung must be a structured XML invoice compliant with EN 16931, contain all mandatory invoice and tax details, include the Leitweg-ID for public-sector invoices, pass validation checks, be sent electronically through an accepted channel, and be archived in a compliant, unchanged format.

Which software should be used for XRechnung?

Use an e-invoicing solution software that can generate XRechnung. Choose your service provider based on your invoice volume, customer requirements and existing systems. E-invoice software like ClearTax generates XRechnung using the applicable specification and can also validate against the schema and business rules. It can also use invoice data from your ERP or accounting system without unnecessary re-entry.

How does an XRechnung (e-invoice) work?

XRechnung represents invoice information as a structured XML dataset. The sender generates and validates the file, then transmits it through the appropriate channel. The recipient’s systems can read and process the structured data without re-entering it from a PDF.

Can I convert a PDF invoice into an XRechnung?

Yes, a PDF invoice can be converted into an XRechnung under European standard EN 16931 (and German business rules like BR-DE). It requires extracting invoice data, reviewing missing fields, and validating the output.

Related Articles

Learn from the people building compliance every day.