CRATEAPI

Factur-X vs ZUGFeRD vs XRechnung: which format, when

Formats3 min read

These three names show up together constantly, and the short version confuses more than it clarifies: "Factur-X and ZUGFeRD are basically the same thing, XRechnung is different." True, but worth unpacking, because the difference changes which endpoint you call.

Factur-X and ZUGFeRD: one format, two names

Both are hybrid documents: a normal, human-readable PDF with a machine-readable EN 16931 CII XML file embedded inside it (as a PDF/A-3 attachment). Open it in a PDF viewer and you see an invoice; open it with software that knows to look, and you get the same invoice as structured XML.

ZUGFeRD came from Germany's Forum elektronische Rechnung (FeRD). Factur-X came out of a joint French-German effort (FNFE-MPE and FeRD) to harmonize the German format with what France needed. Since ZUGFeRD 2.1 / Factur-X 1.0, the two are technically identical — same schema, same profiles (Basic, Comfort/EN 16931, Extended). The name you use is really just about which country's ecosystem you're talking to; the file itself doesn't care.

XRechnung: pure XML, no PDF

XRechnung is different in kind, not just in branding. It's Germany's CIUS on EN 16931 — XML only, either UBL or CII syntax, with extra mandatory fields for public-sector invoicing (most notably a routing identifier, the Leitweg-ID — see our dedicated article on that). It's been required for invoicing German federal and most state public bodies since November 2020, and B2B issuance becomes mandatory in stages from 2027 (over €800k turnover) and 2028 (everyone).

Some German public-sector recipients reject a PDF outright — they want the XML, full stop. That's the case where Factur-X/ZUGFeRD's PDF wrapper is actively unwanted.

Which to generate, and when

SituationUseWhy
Invoicing German public administrations (B2G)XRechnung Often the only format accepted; PDF layer isn't wanted
Invoicing via Peppol networkUBL (Peppol BIS 3.0) Peppol is UBL-only by design
French B2B, or German B2B where a readable copy helps Factur-X / ZUGFeRDRecipient (or their accountant) can open the PDF directly; the embedded XML is still the legally-binding artefact
SME sending invoices where the buyer's system is unknown Factur-X / ZUGFeRDWorks as a normal PDF even if the receiver's software ignores the embedded XML

In our API, generating a hybrid document usually means wrapping your own branded PDF rather than letting us design one:

curl -X POST "$BASE/v1/generate/facturx/embed" \
  -H "X-API-Key: $KEY" \
  -F "invoice=<invoice.json" -F "pdf=@branded.pdf" -o facturx.pdf

That call keeps your existing invoice layout and returns it upgraded to PDF/A-3 with a compliant EN 16931 CII XML embedded — one call for both "looks right to a human" and "parses right for a machine".

Converting between them

Since XRechnung and the CII inside Factur-X/ZUGFeRD share the same EN 16931 semantic model, you don't need to maintain two separate originals — generate the canonical model once, and render it as whichever target format the receiving side actually needs. See UBL vs CII for how the underlying conversion works, or go straight to the Factur-X and XRechnung format pages for curl examples and sample files.

Keep reading

Want to try this against a real invoice?

Every example above calls the same API you can call today — validate for free, or read the full reference.