Spain E-Invoicing Formats: Facturae, UBL, CII, and EN 16931 Explained

By Ankit Arora

|

Updated on: Oct 5th, 2026

|

11 min read

social iconssocial iconssocial iconssocial icons

Spain’s e-invoicing framework requires businesses to exchange structured e-invoices as per the formats specified in the EN 16931. The semantic data model of EN 16931 covers multiple syntaxes including Fracturae, UBL, CII, and EDIFACT. 

The complexity of e-invoicing model is that your ERP may generate one format, the compliance layer may exchange another, and a trading merchant may issue a different syntax. That’s where interoperability and format conversion between platforms comes in the picture. It’s important for the businesses to understand what Spain e-invoicing formats look like and how they are used.

Key Takeaways

  • The four formats used in Spain are Facturae, UBL, CII and EDIFACT.
  • EN 16931 specify all the formats. It's a content standard, not a format you generate.
  • Under the new B2B framework, every invoice not issued through the AEAT's public e-invoicing solution (SPFE) must also go to the SPFE as a certified copy (copia fiel) in UBL, at the same moment it is issued.
  • Facturae is already required for invoicing public administrations under Ley 25/2013. RD 238/2026 also lists it as an accepted B2B syntax (art. 7.1.d), because it is so widely used in Spain.
  • VeriFactu is a separate matter entirely, governing invoicing software integrity rather than the invoice format itself.

What are the Spain E-Invoicing Formats?

Once Spain's B2B mandate applies, invoices between businesses and professionals must exchange the structured electronic invoices based on the EN 16931 semantic data model. Spain accepts four formats: Facturae, UBL, CII and EDIFACT. Each one has to carry data that satisfies EN 16931. The structure and meaning of these formats have been defined by EN 16931.

So EN 16931 is not an invoice file format, instead it defines what an invoice data means. And the four accepted formats are about how that data is produced.

A PDF or scanned invoice does not meet this requirement.

Types of E-Invoicing Formats in Spain

Format

What it is

Facturae (FacturaE XML)Spain's national XML invoice format. Since 15 January 2015, Ley 25/2013 has required e-invoices to public administrations to use Facturae 3.2 with an XAdES signature, for certain suppliers. These invoices go through FACe (the central government's entry point) or the entry points of regional and local administrations. RD 238/2026 lists Facturae as an accepted B2B syntax, as long as the invoice follows the EN 16931 data model.
UBLUniversal Business Language, an XML syntax published by OASIS as ISO/IEC 19845. RD 238/2026 makes it the reference syntax of the Spanish system. The SPFE works only in UBL, and every invoice issued outside the SPFE must reach it as a UBL-certified copy. UBL is also the default between private platforms when the parties haven't agreed on a syntax (art. 7.4).
CIIUN/CEFACT Cross Industry Invoice is the other XML syntax that EN 16931 maps to directly, alongside UBL.
EDIFACTA long-established EDI standard. RD 238/2026 accepts it because it is widely used in many sectors. Like the other syntaxes, an EDIFACT invoice must follow the EN 16931 data model.

There is no single format that businesses have to follow. What matters is the information included in the invoice. EN 16931 sets out the required data, such as the seller’s tax ID, invoice date, VAT details and total payable.

Facturae, UBL, CII and EDIFACT structure this information differently. An invoice can therefore use any accepted format and still meet the required standard.

What is EN 16931: The standard behind the formats

EN 16931 provides the common semantic foundation for all the formats. This is what makes interoperability possible.

For example, one system may create an invoice using UBL while another operates with EDIFACT. The underlying invoice information must correspond to the EN 16931 model.

There's a mapping exercise that matters just as much as format choice, and it's easy to underestimate. EN 16931 in a Spanish ERP context means lining up your internal invoice data model against the semantic fields the standard requires.

Spain E-Invoicing Formats for ERP Systems

Your ERP setup can affect which format you use. The setup varies between ERP systems. Some support EN 16931 directly, while others need an external provider to convert and submit invoices. Businesses using FACe for B2G invoicing may already work with Facturae.

Spain accepts Facturae, UBL, CII and EDIFACT for B2B e-invoicing, but your trading partners won't all agree on the same one. Handle each format separately, and you're running four builds instead of one.

For businesses, this means the question is not simply:

“Which format does my ERP generate?”

It is: “Can my e-invoicing infrastructure translate, validate and exchange invoice data across the formats my customers and platforms use?”

ClearTax connects directly to your ERP and generates compliant invoices in whichever format your counterparty needs, mapped from the same underlying data, without a separate integration for each. Whether you trade in Facturae with a long-standing partner or need a UBL copy for the AEAT's public solution, it comes from one connection, not four.

CTA: Talk to a Spain e-invoicing expert

Common Challenges When Choosing an Invoice Format

The choice of format can become tricky when businesses start using it in practice.

  • Trading partners rarely agree on one format: Support more than one, and the ambiguity around Spain e-invoicing formats starts to make sense. A business dealing with several counterparties often ends up needing to handle whatever format each partner's system produces, not just the one it prefers.
     
  • The UBL copy requirement adds a step: Every invoice needs a UBL copy, but the platform must convert it. The platform or system that issues an invoice outside the SPFE must send a UBL certified copy to the SPFE at the same time. This applies regardless of the original syntax.

The RD also sets out who converts between formats:

  • Private platforms must convert invoices between all accepted formats while keeping their authenticity and integrity intact.
  • When an invoice passes from the issuer's platform to the recipient's platform, the issuer's platform converts it before signing.
  • When the SPFE connects platforms, the recipient's platform retrieves the invoice and converts it if needed.

For businesses, the real work is making sure their ERP data maps correctly to EN 16931, regardless of the output format.

  • XML alone doesn't guarantee EN 16931 compliance: A Facturae or CII file can look perfectly valid and still fail validation if the data behind it is incomplete or mapped incorrectly. Format and content compliance are two different hurdles.
     
  • VeriFactu and Crea y Crece get confused constantly: There's no such thing as a VeriFactu invoice format, since VeriFactu is about the invoicing software itself, chained records, QR codes, tamper-evidence, while Crea y Crece governs the invoice format and how it moves between businesses. Crea y Crece (Ley 18/2022 and RD 238/2026) covers the invoice format, how invoices move between businesses, and the reporting of invoice and payment status.

A business can tick one box and still miss the other entirely.

Conclusion

Whatever syntax is used, every invoice issued outside the SPFE must also reach it as a UBL-certified copy, sent at the same time as the invoice is issued. Businesses using private platforms will also need to send a UBL copy to the public e-invoicing solution.

Frequently Asked Questions

What is the official e-invoicing format in Spain?

Spain has no single mandatory format for exchanging invoices between trading partners. RD 238/2026 (art. 7.1) accepts CII, UBL, EDIFACT and Facturae, as long as the invoice follows the EN 16931 data model. UBL is the reference syntax, though. The AEAT's public solution (SPFE) works only in UBL. Every invoice issued outside the SPFE must reach it as a UBL-certified copy. UBL also applies by default between platforms when the parties haven't agreed on a syntax.

What is EN 16931?

EN 16931 is the European standard that sets out the core data an electronic invoice must contain, such as seller and buyer details, taxes and invoice lines. It is a data model, not a file format. It maps directly to two XML syntaxes: UBL 2.x and UN/CEFACT CII. Spanish law also accepts Facturae and EDIFACT, as long as the invoice follows the EN 16931 data model (RD 238/2026, art. 7.1).

Is Facturae compliant with EN 16931?

Facturae is not one of the syntaxes that EN 16931 maps to directly; those are UBL and CII. Spain nevertheless accepts Facturae for B2B invoicing, provided the invoice follows the EN 16931 data model. Facturae remains the required format for invoicing public administrations under Ley 25/2013.

Will Spain's B2B e-invoicing mandate support multiple invoice formats?

Yes. Trading partners can use CII, UBL, EDIFACT or Facturae, as long as the invoice follows the EN 16931 data model. Peppol BIS messages are also valid between private platforms, because they use UBL and comply with EN 16931. One thing doesn't change: every invoice issued outside the SPFE must reach it as a UBL-certified copy at the time of issue.

Is XML mandatory for Spain e-invoicing?

XML format is not the focus. The requirement is the structured data. RD 238/2026 requires every e-invoice to be a structured electronic message that follows the EN 16931 semantic data model. Three of the four accepted syntaxes are XML: UBL, CII and Facturae. The fourth is the EDIFACT invoice message.

About the Author
author-img

Ankit Arora

Manager - Content
social icons

With a CA academic background and 9+ years of experience in finance, GST, journalism, and e-invoicing, I specialise in translating complex tax and financial regulations into actionable insights for businesses and finance leaders. My experience spans financial copywriting, journalism, real estate, edtech and travel insurance, with a growing focus on the global e-invoicing landscape. My exposure to journalism taught me to look beyond jargon, ask better questions, and find the story behind complex subjects. Read more

Index