#ZUGFeRD vs XRechnung
ZUGFeRD and XRechnung are both German EN 16931-compliant e-invoice formats, but ZUGFeRD is a hybrid PDF-plus-XML file typically used for business-to-business (B2B) invoicing, while XRechnung is a pure-XML format that is mandatory for invoices to German public-sector buyers (B2G). If you're billing a government body, you almost certainly need XRechnung; if you're billing a company, ZUGFeRD is the common choice.
This page explains the two standards factually. It is not tax or legal advice — confirm your own obligations with a qualified advisor.
#At a glance
| Dimension | ZUGFeRD | XRechnung |
|---|---|---|
| Type | Hybrid (XML embedded in a PDF) | Pure XML |
| Container | PDF/A-3 | .xml file |
| Syntax | UN/CEFACT CII | UBL or CII |
| Human-readable alone | Yes | No (needs a viewer) |
| Primary use | B2B (company to company) | B2G (public sector) |
| EN 16931-conformant | Yes (BASIC profile and above) | Yes (CIUS) |
| Buyer reference / Leitweg-ID | Not used | Required for B2G |
#What they have in common
Both express the same EN 16931 invoice data — seller, buyer, line items, taxes, payment terms — and both are accepted as compliant electronic invoices. XRechnung is a CIUS (national specification) of EN 16931; ZUGFeRD reaches conformance through its COMFORT/BASIC profiles. The European core is identical in both.
#The key difference: hybrid PDF vs pure XML
ZUGFeRD wraps the structured XML inside a readable PDF, so a person can open it like any invoice while a machine reads the embedded data. XRechnung is the structured data on its own, with no built-in layout — designed for public-sector systems that ingest the XML directly. That single distinction drives most of the "which one" decision.
#Which one for B2G (public sector)?
XRechnung. Suppliers to German federal authorities are required to send EN 16931-conformant invoices, and XRechnung is the standard format, carrying the Leitweg-ID in the buyer-reference field (BT-10) to route to the right authority.
#Which one for B2B (company to company)?
Either is valid, and ZUGFeRD COMFORT is the common choice because the embedded PDF is convenient for the recipient. As the German B2B e-invoicing mandate phases in, both formats satisfy it (ZUGFeRD at BASIC or above) — see the mandate timeline.
#How Scribo picks the format for you
You don't have to memorise the rules. Scribo chooses the correct format from the invoice itself: if a recipient Leitweg-ID is present, it generates XRechnung (UBL) for the public-sector buyer; otherwise, for German B2B, it produces ZUGFeRD COMFORT. Every file is validated against EN 16931 at generate time. You can drive this from the web app, the HTTP API, the hosted MCP server, the CLI, or the Claude/Codex skill — so a billing agent gets the right compliant file without a human picking the format.
#Frequently asked questions
Which German government buyers require XRechnung? Federal public authorities require XRechnung (or another EN 16931-conformant format) for invoices sent to them, and most federal states have equivalent rules. The invoice must carry a buyer reference, typically the Leitweg-ID, to be routed correctly.
Is ZUGFeRD or XRechnung better for B2B? For business-to-business invoicing both are valid, but ZUGFeRD is the more common B2B choice because it embeds a human-readable PDF alongside the structured data. XRechnung is pure XML, which is ideal for public-sector systems but less convenient when a person needs to read the invoice directly.
Are both ZUGFeRD and XRechnung EN 16931 compliant? Yes. Both conform to EN 16931 — XRechnung as a CIUS (national specification), ZUGFeRD via its EN 16931-conformant profiles such as COMFORT. The underlying invoice data model is the same European standard in both.
Do I need to send both formats? No. You send one format appropriate to the recipient: XRechnung for German public-sector buyers (B2G), and either ZUGFeRD or XRechnung for business buyers (B2B). One correctly chosen format is enough.
Can one invoice satisfy both B2G and B2B needs? In practice you choose per recipient. A public buyer that requires XRechnung needs the pure-XML format with a buyer reference; a business buyer can accept ZUGFeRD's hybrid PDF. Tools that pick the format automatically remove the need to decide manually.
Sources: EU Directive 2014/55/EU; KoSIT — XRechnung; FeRD.