Back to Blog

UBL vs. CII: Comparing the Two E-Invoicing Syntaxes

Published on October 22, 2025by Invapi Team
UBLCIIXRechnungFormatsXML

UBL vs. CII: Comparing the Two E-Invoicing Syntaxes

Anyone dealing with e-invoicing will quickly come across two abbreviations: UBL and CII. Both are XML-based syntaxes that implement the same European standard EN 16931, yet they differ fundamentally in their structure. In this article, we explain the differences, the commonalities, and help you decide which syntax is right for your use case.

What Is EN 16931?

Before diving into the syntaxes, a brief look at the framework: The European standard EN 16931 defines a semantic data model for electronic invoices. It describes what information an e-invoice must contain and what business rules apply. However, the standard itself is syntax-independent. It specifies what must be included in an invoice, but not how the XML file should be structured.

That is where the two official syntaxes come in: UBL and CII.

UBL 2.1: The OASIS Standard

Universal Business Language (UBL) is an XML format developed by the standards organization OASIS. UBL covers far more than just invoices. It defines documents for the entire procurement process, from orders and despatch advices to invoices.

Characteristics of UBL

  • Namespace: urn:oasis:names:specification:ubl:schema:xsd:Invoice-2
  • Root element: <Invoice> (or <CreditNote> for credit notes)
  • Structure: Flat and modular with clearly named elements
  • Adoption: Widely used internationally, especially in Scandinavia, the Netherlands, and the Peppol network
  • XRechnung: XRechnung supports UBL as one of its two permitted syntaxes

Example (simplified)

<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
  <cbc:ID>INV-2025-001</cbc:ID>
  <cbc:IssueDate>2025-07-25</cbc:IssueDate>
  <cac:AccountingSupplierParty>
    <cac:Party>
      <cac:PartyName>
        <cbc:Name>Muster GmbH</cbc:Name>
      </cac:PartyName>
    </cac:Party>
  </cac:AccountingSupplierParty>
</Invoice>

CII D16B: The UN/CEFACT Standard

Cross-Industry Invoice (CII) is maintained by UN/CEFACT (United Nations Centre for Trade Facilitation and Electronic Business). CII is based on the Supply Chain Reference Data Model (SCRDM) and uses a more deeply nested structure than UBL.

Characteristics of CII

  • Namespace: urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100
  • Root element: <CrossIndustryInvoice>
  • Structure: Deeply nested with grouped context elements
  • Adoption: Widely used in Germany and France, the basis for ZUGFeRD and Factur-X
  • ZUGFeRD: ZUGFeRD exclusively uses CII as its embedded XML format

Example (simplified)

<rsm:CrossIndustryInvoice xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100">
  <rsm:ExchangedDocument>
    <ram:ID>INV-2025-001</ram:ID>
    <ram:IssueDateTime>
      <udt:DateTimeString format="102">20250725</udt:DateTimeString>
    </ram:IssueDateTime>
  </rsm:ExchangedDocument>
</rsm:CrossIndustryInvoice>

Key Differences

PropertyUBL 2.1CII D16B
Standards bodyOASISUN/CEFACT
Nesting depthFlatterMore deeply nested
Date formatISO 8601 (2025-07-25)UN/EDIFACT Format 102 (20250725)
Credit noteSeparate CreditNote documentVia TypeCode within the same document
ZUGFeRD compatibilityNoYes
Peppol compatibilityYes (standard)Yes (optional)
XRechnung compatibilityYesYes

Which Syntax Should You Choose?

Choose UBL if:

  • You send invoices via the Peppol network (UBL is the standard there)
  • You work internationally with partners in Scandinavia or the Benelux countries
  • You send XRechnung invoices to public sector clients in Germany (both syntaxes are permitted, UBL is slightly more common)
  • You prefer a flatter, more readable XML structure

Choose CII if:

  • You want to create ZUGFeRD/Factur-X invoices (CII is mandatory for these)
  • You work with French business partners (Factur-X is based on CII)
  • You need a hybrid PDF with embedded XML invoice data

Using Both Syntaxes with invapi

invapi fully supports both UBL and CII. You can create, convert, and validate invoices in both syntaxes, all through a unified API. The free XRechnung Validator also automatically detects whether an invoice is UBL or CII and validates it against the correct set of rules.

If you are unsure which syntax you need, start with UBL for pure XRechnung invoices or with CII if you want to generate ZUGFeRD PDFs. With invapi, you can convert between formats at any time. Take a look at our pricing to find the right plan for your requirements.

Conclusion

UBL and CII are two equally valid ways to implement the same European standard. The choice depends on your specific use case: UBL for international and Peppol scenarios, CII for ZUGFeRD and the German-French market. With the right tools, you do not need to commit to a single syntax but can flexibly switch between both.