Spain E-Invoicing Formats: Facturae, UBL, CII, and EN 16931 Explained
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. |
| UBL | Universal 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). |
| CII | UN/CEFACT Cross Industry Invoice is the other XML syntax that EN 16931 maps to directly, alongside UBL. |
| EDIFACT | A 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.