CII vs UBL in XRechnung: Which Syntax Should You Use?
XRechnung can be delivered in two different XML formats: UN/CEFACT Cross Industry Invoice (CII) and OASIS UBL 2.1. Both are valid under the European standard EN 16931 and both are accepted by German public-sector buyers, but they have practical differences worth understanding.
What XRechnung syntax means
XRechnung is a German profile of the European e-invoice standard EN 16931. The standard specifies the semantic data model (what data must be present) but allows the actual XML to be encoded in either of two syntaxes. The end result for the buyer is equivalent: the same invoice data, structured differently at the XML level.
CII (Cross Industry Invoice)
- Full name: UN/CEFACT Cross Industry Invoice D16B.
- More commonly used in Germany and in ZUGFeRD/Factur-X (the hybrid PDF format).
- File extension: .xml.
- XRechnung CII uses a relatively flat XML structure.
- Validation schema: XRechnung-CII-validation-X.X.X.zip from the KoSIT validator.
UBL 2.1 (Universal Business Language)
- Full name: OASIS UBL 2.1 Invoice.
- More common in international PEPPOL transactions and in some northern European markets.
- File extension: .xml.
- Slightly more verbose XML structure with different element names for the same data.
- Also fully valid for German public-sector submission when produced as an XRechnung UBL profile.
Practical differences
- The semantic data (invoice number, amounts, VAT, parties) is identical in both syntaxes.
- Some German receiving systems have historically handled CII more reliably, though both are now well supported.
- ZUGFeRD and Factur-X use CII exclusively; if you generate hybrid PDF invoices, CII is the only option.
- If you send through PEPPOL, the network uses UBL 2.1 by default.
- Validation can be done with the official KoSIT XRechnung validator for both syntaxes.
Which should you choose?
Choose CII if: you are targeting German public-sector buyers with no specific instruction, you use ZUGFeRD or Factur-X, or your invoicing software defaults to CII. Choose UBL 2.1 if: your software generates UBL natively, you operate in an international context where UBL is standard, or the buyer specifically requests UBL. Both are correct; interoperability is not an issue as receiving systems must accept both.
This article is for general information only and is not tax or legal advice. For specific questions about e-invoice compliance in your situation, consult a tax adviser or accountant. E-Rechnung exports invoices in both XRechnung CII and ZUGFeRD formats. For more on the main formats compared, see the article on XRechnung vs ZUGFeRD.
Common questions
- Can I mix CII and UBL invoices with the same buyer?
- Yes, as long as the buyer's system accepts both. Most German public portals (such as ZRE and OZG-RE) accept both XRechnung CII and UBL 2.1. If a buyer specifies one syntax, use that one consistently. If no preference is stated, CII is the safer default for the German market.
- Is ZUGFeRD CII or UBL?
- ZUGFeRD (and its European equivalent Factur-X) uses CII exclusively. The embedded XML within the PDF is always UN/CEFACT CII. If you need a hybrid PDF format, CII is your only option.
- How do I validate my XRechnung XML?
- Use the official KoSIT XRechnung validator (validator.kosit.de or the downloadable command-line version). It validates both CII and UBL 2.1 XRechnung files against the current version of the XRechnung specification and reports field-level errors.
- Does the syntax choice affect what data I need to include?
- No. Both CII and UBL 2.1 must contain the same mandatory and conditionally mandatory fields defined in EN 16931 and the XRechnung German extension. The structure of the XML differs but the data requirements are identical.