XRechnung vs ZUGFeRD: Which Format Should You Use for the German Mandate?
XRechnung and ZUGFeRD both comply with Germany's e-invoicing mandate โ but they work very differently. This guide tells you exactly which to choose based on your business situation.
XRechnung vs ZUGFeRD: Which Format Should You Use for the German Mandate?
Germany's B2B e-invoicing mandate accepts both XRechnung and ZUGFeRD โ but they are fundamentally different files, suited to different situations. Choosing the wrong one won't get you fined, but it can cause friction with customers and software.
This guide cuts through the confusion and tells you, based on your specific situation, which format to use.
The Short Answer
| Your situation | Use this format |
|---|---|
| Invoicing a German government agency (B2G) | XRechnung (required) |
| Invoicing a large enterprise with technical procurement | XRechnung (usually preferred) |
| Invoicing most German B2B customers | ZUGFeRD (EN 16931 profile) |
| Your customer has no structured-invoice-capable software | ZUGFeRD (the PDF is human-readable) |
| You want the simplest option for 2027 compliance | ZUGFeRD (EN 16931 profile) |
What Is XRechnung?
XRechnung is a pure XML file โ no PDF, no visual representation. It is Germany's implementation of the EN 16931 European e-invoice standard expressed in either:
- UBL 2.1 syntax (Universal Business Language)
- UN/CEFACT CII syntax (Cross-Industry Invoice)
It was originally designed for German public procurement (B2G) and remains the mandatory format for all invoices to German federal and state government agencies. A Leitweg-ID (routing code) is required for B2G invoices.
What XRechnung looks like
Opening an XRechnung file in a text editor shows something like this:
<ubl:Invoice xmlns:ubl="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" ...>
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_3.0</cbc:CustomizationID>
<cbc:ID>RE-2026-0042</cbc:ID>
<cbc:IssueDate>2026-04-15</cbc:IssueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
...
</ubl:Invoice>
There is no PDF. The recipient's software reads the XML and imports the data directly.
What Is ZUGFeRD?
ZUGFeRD (Zentraler User Guide des Forums elektronische Rechnung Deutschland) is a hybrid format โ a regular PDF/A-3 file with a structured XML document embedded inside it.
This means:
- Humans see a normal-looking PDF invoice
- Software reads the embedded XML to import the invoice data automatically
- The same file satisfies both parties
ZUGFeRD 2.3 is the current version (as of 2025). For the German mandate, only two profiles qualify:
| Profile | Mandate compliant? | Use case |
|---|---|---|
| Minimum | โ No | Internal use only |
| Basic WL | โ No | Not compliant |
| Basic | โ No | Not compliant |
| EN 16931 (also called "Comfort") | โ Yes | Standard B2B invoicing |
| XRechnung (ZUGFeRD profile) | โ Yes | B2G + demanding B2B |
Always use the EN 16931 or XRechnung profile in ZUGFeRD. Minimum and Basic profiles are not valid for the mandate.
Key Differences Side by Side
| Feature | XRechnung | ZUGFeRD (EN 16931) |
|---|---|---|
| File format | XML only | PDF/A-3 with embedded XML |
| Human-readable | โ (needs viewer) | โ Normal PDF |
| Required for B2G | โ Yes (Leitweg-ID) | โ Accepted |
| Valid for B2B mandate | โ Yes | โ Yes |
| File size | Small (~10โ50 KB) | Larger (~100โ500 KB) |
| Technically identical data | โ Same EN 16931 data model | โ Same EN 16931 data model |
| Best for tech-heavy customers | โ | โ |
| Best for customers without special software | โ | โ PDF fallback |
When You Must Use XRechnung
German public-sector invoicing requires XRechnung (or ZUGFeRD with XRechnung profile). Specifically:
- Federal government agencies (Bundesbehรถrden)
- State government agencies (Landesbehรถrden)
- Municipal agencies that have activated electronic invoicing
- Universities, research institutions, and other public bodies
For all of these, you need:
- XRechnung (UBL or CII) or ZUGFeRD with XRechnung profile
- The recipient's Leitweg-ID (a routing code like
99-123456-78) โ ask your government client for this - The Leitweg-ID must go in the "Buyer Reference" field (BT-10)
Without the Leitweg-ID, your invoice will be rejected.
When ZUGFeRD Is the Better Choice
For most private-sector B2B invoicing, ZUGFeRD is the pragmatic choice:
- Your customer can't process XML directly: The PDF fallback means they can still read and process the invoice manually if needed โ useful during the transition period
- Your customer's software may not yet be configured: Even if they can technically receive XRechnung, their setup may not auto-import it yet. ZUGFeRD's PDF ensures payment isn't delayed.
- Simpler customer communication: "We're now sending invoices as PDFs with embedded data" is easier to explain than "we're sending you an XML file"
Technical Validation: KoSIT Validator
Before switching to live production, validate your invoice format using the KoSIT online validator:
- Go to validator.kosit.de or the ecosio validator
- Upload your generated XRechnung XML or ZUGFeRD PDF
- Check that:
- No validation errors appear (warnings may be acceptable)
- The profile line reads "EN 16931" or "XRechnung" โ not "Minimum" or "Basic"
Common validation errors:
- Missing BT-10 buyer reference
- Wrong tax category codes (AE, E, S โ check the correct code for your invoice type)
- IBAN in wrong format (must be ISO 13616)
- Date format errors (ISO 8601: YYYY-MM-DD)
What Your Software Generates
Most German accounting software defaults to ZUGFeRD for B2B and XRechnung for B2G. Check your settings:
| Software | ZUGFeRD settings | XRechnung settings |
|---|---|---|
| sevDesk | Settings โ E-Invoice โ Format: ZUGFeRD โ Profile: EN 16931 | XRechnung via separate template |
| DATEV | Via Mittelstand Faktura, profile configured by tax advisor | XRechnung for Leitweg-ID invoices |
| easybill | Document โ ZUGFeRD โ Profile EN 16931 | XRechnung output available |
| Lexware | Invoice settings โ ZUGFeRD โ Level EN 16931 | XRechnung for B2G |
| weclapp | Settings โ E-Invoicing โ ZUGFeRD 2.3 EN 16931 | XRechnung for B2G channel |
Always validate after configuration โ and especially after software updates, which sometimes reset default profiles.
Factur-X: The French Equivalent of ZUGFeRD
If you invoice French customers, you may encounter Factur-X. This is technically identical to ZUGFeRD 2.x โ the same format, the same profiles, the same EN 16931 data model. If your software generates ZUGFeRD EN 16931, it can generally generate Factur-X with minor configuration changes.
Conclusion: Which Should You Choose?
- Government customers: Always XRechnung (with their Leitweg-ID)
- Most private B2B customers: ZUGFeRD EN 16931 profile โ it's simpler, safer, and widely accepted
- Tech-forward B2B customers who explicitly request XRechnung: Accommodate them
- Future-proofing: ZUGFeRD can carry the XRechnung profile โ one format serves both audiences
The bottom line: ZUGFeRD EN 16931 is the pragmatic default for most German businesses. It meets the mandate, is human-readable, and causes the least friction with customers who haven't yet fully configured their invoice processing.