Skip to content
Mein MwSt-Rechner

Creating an XRechnung: guide, mandatory fields and options

By Bardhyl Bytyqi & Armend BajramiUpdated on 29/05/20261 min read

In short

An XRechnung is a structured XML invoice under EN 16931. You can create it with e-invoicing software, through the free federal portals (web entry), or with a converter. Mandatory are all usual invoice details plus, for public-sector invoices, the Leitweg-ID. Check the result with a viewer before you send it.

What is an XRechnung – and what must it contain?

An XRechnung is a purely structured invoice in XML format under the EN 16931 standard. It holds the same details as a normal invoice, but machine-readable.

Mandatory fields include the invoice number, date, seller with tax number or VAT ID, buyer details, line items, tax rate and amounts. For invoices to public authorities (B2G), the Leitweg-ID is added as the buyer reference.

Ways to create an XRechnung

There are three common routes:

  • E-invoicing or accounting software: many tools export invoices directly as a valid XRechnung.
  • Free federal portals: through the central invoice receipt platform (ZRE) and the OZG-compliant platform (OZG-RE) you can enter invoices to the federal government via an online form (web entry) – without your own software.
  • Converters and services: turn existing invoice data into an XRechnung.

XRechnung or ZUGFeRD?

Both meet EN 16931. The XRechnung is a pure XML file and the standard for public-sector invoices. ZUGFeRD is hybrid – a PDF with embedded XML – and often more practical in B2B. The guide XRechnung vs. ZUGFeRD explains the differences.

Check the XRechnung before you send it

A faulty XRechnung is often rejected. So check the generated file in advance with the free e-invoice viewer: it shows the invoice in plain text and checks the core EN 16931 mandatory fields, including the buyer reference or Leitweg-ID.

And if I only need a normal invoice?

If you do not need an XRechnung but a classic invoice as a PDF – for example in B2B without an XRechnung requirement – create it in under a minute with the invoice generator. It produces a § 14 UStG-compliant PDF invoice (not XRechnung XML).

Frequently asked questions

How do I create an XRechnung?

With e-invoicing or accounting software that exports XRechnung, through the free federal portals via web entry, or with a converter. What matters is all mandatory fields and, for public-sector invoices, the Leitweg-ID.

Can I create an XRechnung for free?

Yes. For invoices to the federal government, the ZRE and OZG-RE platforms offer free online entry (web entry). Many accounting programs also export XRechnung files.

Which details does an XRechnung need?

All the usual invoice details: invoice number, date, seller with tax number or VAT ID, buyer, line items, tax rate and amounts. For public-authority invoices, the Leitweg-ID as the buyer reference as well.

Do I need a Leitweg-ID for the XRechnung?

Only for invoices to public-sector clients (B2G), where the Leitweg-ID as the buyer reference is mandatory. For B2B invoices between businesses it is not required.

How do I check whether my XRechnung is valid?

Open the generated XML in the e-invoice viewer. It shows the invoice in plain text and checks the core EN 16931 mandatory fields. That reveals missing details before you send the invoice.

Related tools