What is Facturae?
Facturae is Spain's structured electronic-invoice format: an XML file a computer reads, not a PDF a human reads. Public administrations require it and receive it through FACe, the government's invoicing point of entry. Under the Crea y Crece law, structured e-invoicing is also being extended to business-to-business transactions.
This tool builds a valid Facturae 3.2.2 file entirely in your browser — with a correct Spanish tax breakdown — and gives you a readable PDF to send alongside it. Nothing is uploaded.
NIF, person type and residence
Every party on a Facturae carries a tax identity. Fill it correctly and the file will be accepted:
- NIF / DNI / CIF — the Spanish tax identification number of the seller and the buyer.
- Person type — “individual” (persona física, code F) for a freelancer, or “company” (persona jurídica, code J) for a business.
- Residence — resident in Spain (R), elsewhere in the EU (U), or non-EU (E). This decides whether the address is recorded as a Spanish address or an overseas one.
IRPF withholding and recargo de equivalencia
This is what makes a Spanish invoice different — and what most generic tools get wrong.
IRPF (retención) is an income-tax withholding that a freelancer applies to their own invoice. It is subtracted from the total: the client pays you less now and pays that part to the tax agency on your behalf. Common rates are 15%, or 7% in the first years of activity. In the file it's recorded as TaxesWithheld.
Recargo de equivalencia is a surcharge that certain retailers must add. It's tied to the IVA rate (5.2% on 21%, 1.4% on 10%, 0.5% on 4%) and is added to the total, recorded on the IVA line.
Invoicing a public body: DIR3 and FACe
When your client is a public administration, the invoice must be routed with three DIR3 codes: the Oficina Contable (accounting office), the Órgano Gestor (managing body) and the Unidad Tramitadora (processing unit). Your public-sector client gives you these codes.
Tick “this client is a public administration” in the tool and the three fields appear. They're written into the file as administrative centres so FACe can route it.
Signing for FACe (Autofirma)
To send a Facturae to a private client, a signature is often not required. To submit it to a public administration through FACe, the file must carry a XAdES electronic signature made with your certificate.
A browser tool cannot sign silently without handling your certificate, so we don't pretend to: this tool produces a valid unsigned file, and you sign it with Autofirma, the free official signing application, before uploading to FACe. Your data still never leaves your device.
Facturae vs VeriFactu — not the same thing
They're easy to confuse but they're different. Facturae is the invoice file (the XML you send). VeriFactu is a regulation about your billing software (RD 1007/2023): chained, tamper-evident records, a QR code on the invoice, and — in Veri*Factu mode — sending each record to the tax agency in real time.
This tool produces the Facturae file. It does not produce VeriFactu records or a VeriFactu QR, and it reports nothing to AEAT.
Create a Facturae, step by step
Follow these in the free generator. Everything happens in your browser — your invoice data is never uploaded.
-
Enter your details (seller)
Your name or business, NIF/DNI/CIF, person type and residence, plus your full address including province. Freelancers keep the “individual / resident in Spain” defaults.
-
Enter your client (buyer)
The client's name, NIF/CIF, person type and address. If the client is a public administration, tick the box to reveal the DIR3 routing codes.
-
Set the invoice number and dates
Give the invoice a number (and an optional series), an issue date, and a due date. Add the operation date if the goods or services were supplied on a different day.
-
Choose tax, IRPF and items
Pick your IVA treatment (standard, exempt, or reverse charge), add your IRPF withholding if you're a freelancer, tick recargo if it applies, and list your items. The total updates live — with IRPF subtracted.
-
Add payment details
Your IBAN, account holder and optional BIC, plus any payment terms. These become the payment block of the Facturae.
-
Download and sign
When the status shows “ready to export”, download the Facturae XML and a matching PDF. To submit to FACe, sign the XML with Autofirma — everything up to that point is built on your device.
Validate before you send
We check that the required fields are present, but we're not a full compliance validator. Before sending an important invoice, run the downloaded file through the official FACe validator — it checks the structure and the signature.
- Confirm the NIFs of both parties are correct.
- For a public body, confirm the three DIR3 codes.
- Sign with Autofirma if the destination is FACe.
- Run the file through the FACe validator as a final check.
Frequently asked questions
Is my data uploaded?
No. The Facturae XML is assembled in your browser and downloaded from your device. Your invoice data is never sent to a server.
Does it handle IRPF and recargo?
Yes. IRPF withholding is subtracted from the total and recorded as TaxesWithheld; recargo de equivalencia is added on the IVA line. That's what makes a real autónomo invoice correct.
Do I need an electronic signature?
Often not for a private client. To submit to a public administration through FACe, yes — sign the file with the free Autofirma tool first.
Is this VeriFactu?
No. VeriFactu is a separate billing-software regime (chained records, QR, real-time reporting to AEAT). This tool produces the Facturae invoice file, not VeriFactu records.
Which Facturae version does it produce?
Facturae 3.2.2, the current version accepted by FACe.