Back to Blog

XRechnung vs. ZUGFeRD: Which E-Invoice Format Is Right for You?

Published on August 12, 2025by Invapi Team
XRechnungZUGFeRDE-InvoicingFormats

XRechnung vs. ZUGFeRD: Which E-Invoice Format Is Right for You?

With mandatory e-invoicing in Germany, businesses face a key question: XRechnung or ZUGFeRD? Both formats comply with the European standard EN 16931, but they differ fundamentally in structure and use case. This article helps you make the right choice.

What Is XRechnung?

XRechnung is the German standard for electronic invoices submitted to public sector entities. It is a pure XML format, transmitted as either UBL (Universal Business Language) or CII (Cross-Industry Invoice). The invoice contains exclusively machine-readable, structured data — there is no visual PDF representation.

XRechnung was developed by KoSIT (the Coordination Office for IT Standards) and has been mandatory for invoices to federal government agencies since November 2020. The standard defines additional business rules beyond the European norm, such as the mandatory Leitweg-ID.

What Is ZUGFeRD?

ZUGFeRD (Central User Guide of the Forum for Electronic Invoicing Germany) is a hybrid format that embeds a machine-readable XML file within a PDF/A-3 document. Recipients can therefore both view the invoice visually as a PDF and process it automatically via the embedded CII XML file.

ZUGFeRD 2.x is identical to the French standard Factur-X and offers six profiles with varying levels of detail: Minimum, Basic WL, Basic, EN 16931 (Comfort), Extended, and XRechnung. The "EN 16931" (Comfort) profile fully implements the European data model and is the recommended choice for B2B invoices. The "XRechnung" profile meets the requirements of the XRechnung standard and — unlike all other profiles — is generated as a pure XML file without a PDF.

The Key Differences

Data Format

  • XRechnung: Pure XML (UBL or CII). No visual document included.
  • ZUGFeRD: PDF/A-3 with embedded CII XML. Both visually and machine-readable.

Use Case

  • XRechnung: Mandatory for invoices to public sector entities (federal, state, and municipal authorities).
  • ZUGFeRD: Flexibly applicable in the B2B sector and increasingly in the public sector as well (via the XRechnung profile).

EN 16931 Compliance

Both formats are based on the European standard EN 16931 and thus meet the legal requirements for an electronic invoice. XRechnung defines additional national rules (CIUS — Core Invoice Usage Specification) that are checked during validation.

Readability

  • XRechnung: Requires software for visualization. Without specialized tools, the XML file is difficult for humans to read.
  • ZUGFeRD: The PDF can be opened in any PDF reader. Machine processing is handled via the embedded XML.

When to Choose Which Format?

XRechnung is the right choice when:

  • You submit invoices to federal agencies or public sector entities
  • The recipient explicitly requires XRechnung
  • You transmit via the Peppol infrastructure
  • Your systems already operate on an XML basis

ZUGFeRD is the right choice when:

  • You send invoices to business customers in the B2B sector
  • Recipients also need the invoice visually as a PDF
  • You are pursuing a gradual transition from PDF to e-invoicing
  • You work internationally with partners in France (Factur-X compatibility)

Using Both Formats with invapi

invapi fully supports both XRechnung and ZUGFeRD. Through the API, you can:

  • Convert JSON to UBL/CII to generate XRechnung-compliant files
  • Create ZUGFeRD PDFs by embedding CII XML into existing PDFs
  • Parse incoming invoices in both formats and convert them to structured JSON
  • Validate every generated document against EN 16931 and XRechnung rules

With the free plan, you can test both formats right away.

Conclusion

XRechnung and ZUGFeRD are not competitors — they complement each other. For the public sector, XRechnung is unavoidable, while ZUGFeRD excels in the B2B space with its combination of PDF and XML. Businesses that master both formats are fully prepared for the e-invoicing mandate.