Skip to content

XRechnung: format, structure and checking

An XRechnung is an invoice as an XML file that a program can read and check. This page explains what it contains, what it looks like and how to check or create one.

Check a file for freeConvert a PDF

What is an XRechnung?

XRechnung is the German standard for electronic invoices. It implements the European standard EN 16931 and is published by KoSIT, the German coordination office for IT standards.

An XRechnung is a plain XML file: not a PDF and not an image. Every detail sits in a fixed field with an identifier, for example BT-1 for the invoice number. That is why software can take over the invoice without retyping.

What does an XRechnung look like?

This is how an XRechnung in UBL syntax starts:

XML
<ubl:Invoice>
  <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID>
  <cbc:ID>RE-2026-0142</cbc:ID>
  <cbc:IssueDate>2026-11-14</cbc:IssueDate>
  <cbc:BuyerReference>04011000-12345-06</cbc:BuyerReference>
  <!-- Verkäufer, Käufer, Positionen, Summen -->
</ubl:Invoice>

Without a program the file is hard for people to read. The validator shows whether the file is valid and which field an error concerns. It does not render the invoice as a picture.

UBL or CII: the two formats

An XRechnung comes in two syntaxes:

SyntaxOrigin
UBLUniversal Business Language
CIICross Industry Invoice by UN/CEFACT

Both carry the same details and are equivalent. Whoever issues the invoice chooses one of them. The validator checks both.

Leitweg-ID and buyer reference

Every XRechnung needs a buyer reference (field BT-10). For invoices to public-sector buyers this is the Leitweg-ID, which the buyer gives you. For invoices to businesses you enter a reference your customer specifies.

If the field is missing, the validator reports rule BR-DE-15. It is one of the most common errors.

XRechnung or ZUGFeRD?

XRechnungZUGFeRD
FileXMLPDF with embedded XML
Readable by peopleonly with a programyes, the PDF
Readable by programsyesyes, the embedded XML
StandardEN 16931EN 16931, depending on the profile

The content is the same in both cases. Public-sector buyers usually require an XRechnung. Between businesses ZUGFeRD is often more practical, because the recipient can read the PDF without a program. When in doubt, ask your customer which format they accept.

Who has to use XRechnung?

Invoices to German federal authorities must be electronic; the federal states have their own rules. Between businesses in Germany the e-invoicing mandate applies: it requires an invoice under EN 16931, and XRechnung is one of the formats that meet it.

Checking an XRechnung

Upload the XML file in the validator. It checks with the official KoSIT validator and the rule set XRechnung 3.0.2. The traffic light shows the result, and every error comes with its rule, its field and an explanation. Checking is free and needs no account.

Creating an XRechnung

If you only have a PDF, the converter reads the details. You check and confirm every field. The result is an XRechnung that is checked before download. No value is calculated or filled in.

Handling incoming XRechnung invoices

If you receive XRechnung files by email regularly, you do not need to download and upload each file by hand. The email inbox gives your account its own inbound address: the KoSIT validator checks every forwarded XML file. Valid invoices go straight to your tax firm or accounting with a readable PDF and check protocol; invalid ones stay with you together with a ready-made reply to the supplier.

This feature requires an account: the free plan includes 10 email invoices a month, and forwarding to accounting starts on Starter (€9 a month, at no extra credit cost). Create a free account.

Common errors

  • BR-DE-15: the buyer reference (BT-10) is missing.
  • Totals do not add up: lines, tax and the invoice total do not describe the same invoice.
  • Mandatory seller details are missing: for example the contact or the tax number.

Every rule, with cause and fix, is listed under rules.

The format of the invoice is checked. Whether the tax rate and any exemption are right is for you and your tax adviser.

Check your next e-invoice before you send it.

No account needed, with the official KoSIT validator.

Prefer an account and the API? Create an account