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.
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.
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.
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.
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
The choice of format can become tricky when businesses start using it in practice.
The RD also sets out who converts between formats:
For businesses, the real work is making sure their ERP data maps correctly to EN 16931, regardless of the output format.
A business can tick one box and still miss the other entirely.
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.
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