Skip to content

Facturae XML viewer

Read Spanish Facturae 3.2.x (.xml and .xsig) e-invoices—including IVA/IGIC, IRPF withholding and FACe DIR3 centres—and export a clean PDF.

Drop a Spanish Facturae (.xml or .xsig) file here

Reads Facturae 3.2, 3.2.1 and 3.2.2 invoices (including IRPF withholding and FACe DIR3 codes) and saves a clean PDF locally.

Parsed and checked locally in your browser. Your e-invoice is never uploaded.

How to use Facturae XML viewer

  1. Load your invoice file. Drop a Spanish .xml or .xsig file onto Drop a Spanish Facturae (.xml or .xsig) file here, or click Choose a file.
  2. Review tax and party details. Check seller and buyer NIF/CIF numbers, FACe DIR3 centres, IVA or IGIC rates, and IRPF / Taxes withheld in the Schema details block.
  3. Inspect arithmetic checks. Read the Checks panel at the top to confirm line sums, tax totals, and <TotalExecutableAmount> reconcile.
  4. Export your copy. Click Save as PDF for a printable invoice, Download the XML to save the XML payload, or Open another to inspect a different file.

Everything you type stays in this browser on your device. Nothing is uploaded, and your saved details are never sent anywhere.

How Facturae .xml and signed .xsig files differ

Spanish electronic invoices use either an unsigned .xml document or a digitally signed .xsig file formatted with XAdES. Both formats carry the exact same <Facturae> business payload, including seller details, buyer tax identifiers, item lines, and payment installments.

When you open (abrir) an .xsig file in this Facturae viewer (visor Facturae), the browser extracts the inner XML payload automatically without requiring desktop Java tools. You can inspect every line item, tax code, and payment term immediately in one readable layout.

Reading enveloped and enveloping XAdES signatures locally

Spanish signing tools attach XAdES signatures in two structural patterns. Enveloped signatures place a <ds:Signature> block inside the <Facturae> root element, while enveloping signatures wrap the entire <Facturae> element inside <Signature><Object>.

This viewer handles both structures locally inside a Web Worker with 0 bytes uploaded to any server. Under the Spanish Ministry Facturae 3.2.2 Schema Specification, the underlying XML remains UTF-8 or ISO-8859-1 encoded, and our decoder supports Windows-1252, ISO-8859-2, and Windows-1250 as well.

Supported Facturae 3.2, 3.2.1, and 3.2.2 schema versions

The parser reads <SchemaVersion> from <FileHeader> and supports versions 3.2, 3.2.1, and 3.2.2 without requiring manual version selection. Country codes are normalized from 3-letter ISO 3166-1 alpha-3 codes such as ESP, DEU, or FRA into 2-letter ISO codes.

Unit codes on each <InvoiceLine> default to C62 when omitted, and <ArticleCode> values appear beneath the item name as a reference. If you also receive pan-European invoices in UBL, CII, or Factur-X formats, open them in our browser-based e-invoice viewer for unified EN 16931 inspection.

How does the viewer handle IVA, IGIC, and IRPF withholding?

Spanish freelance and professional invoices frequently combine output VAT (IVA or Canary Islands IGIC) with income tax withholding (IRPF). The viewer reads <TaxesOutputs> and <TaxesWithheld> separately, then subtracts <TotalTaxesWithheld> from the gross total so the payable amount matches <TotalExecutableAmount>.

Many generic XML readers treat withholding taxes as zero or add them to the total, triggering false arithmetic errors. Reading <TotalExecutableAmount> and <TotalOutstandingAmount> directly prevents those mismatches.

Facturae XML element Tax or field role Viewer calculation behavior
<TaxesOutputs> (TaxTypeCode 01) Mainland Spanish IVA (for example 21%, 10%, 4%) Added to <TotalGrossAmountBeforeTaxes>
<TaxesOutputs> (TaxTypeCode 03) Canary Islands IGIC Displayed in VAT breakdown and added to gross total
<TaxesWithheld> (TaxTypeCode 04) IRPF professional withholding Shown in Schema details and subtracted from payable
<TotalExecutableAmount> Net amount due after withholding Matched against final payable balance
<Installment> Split payment due dates Summed when multiple payment installments exist

Before recording a supplier or client invoice in your ledger, you can validate Spanish NIF, NIE, and CIF tax numbers offline to catch typographical errors in 9-character tax identifiers.

FACe DIR3 administrative centres and B2G routing codes

Invoices addressed to Spanish ministries, municipalities, hospitals, or universities require structured routing identifiers. Under Spanish Law 25/2013 on Electronic Invoicing, suppliers billing public bodies above statutory thresholds must submit signed Facturae files through the FACe portal.

Locating the three FACe DIR3 administrative centre codes

FACe routes each invoice using three DIR3 administrative centre codes embedded inside <BuyerParty><AdministrativeCentres>. When present, the viewer extracts all three roles (01 Oficina Contable, 02 Órgano Gestor, and 03 Unidad Tramitadora) into Schema details.

If <FileReference> is absent on the first invoice line, those DIR3 codes also populate Buyer reference in the header summary. This makes it easy to confirm that a rejected FACe submission targeted the right public department.

Checking order references, corrective invoices, and installments

Purchase order identifiers stored in <ReceiverTransactionReference> appear in the header as Order. When you need to issue formal order paperwork before invoicing, you can prepare supplier purchase orders before billing in your browser.

Corrective invoices (InvoiceClass starting with OR or OC) are mapped to UNTDID document type 384 (Corrected invoice) and display the referenced <Corrective><InvoiceNumber>. Multi-installment <PaymentDetails> schedules are also summarized with each due date and EUR amount.

Exporting readable PDFs and checking EU e-invoice rules

Once an invoice loads, the Checks panel evaluates core totals, line sums, and required party details against EN 16931 business rules. According to the European Commission eInvoicing in Spain Profile, Spain operates Facturae alongside EU EN 16931 standards for cross-border public procurement.

Saving clean PDF copies and downloading unwrapped XML

Click Save as PDF to render a clean A4 invoice PDF inside a Web Worker, or click Full preview to inspect the rendered pages before downloading. Clicking Download the XML saves the underlying XML file locally for archival or ERP import, including <LegalLiterals> and <InvoiceAdditionalInformation> notes.

Tip: Keep both the original .xsig file and the generated PDF in your accounting archive, because Spanish tax audits require preserving the signed electronic original alongside human-readable copies.

Privacy boundaries and formal XAdES validation scope

All XML parsing, character decoding, and PDF generation run inside your browser tab with 0 KB sent over the network. If you also inspect Italian SdI invoices in .xml or CAdES .xml.p7m envelopes, open them in the FatturaPA viewer.

Under Spanish retention rules, businesses typically preserve electronic invoices for at least 4 to 6 years for tax and commercial audits. Note that this viewer checks arithmetic consistency and displays XML fields for operational convenience rather than certified legal or tax advice; use official FACe or VALIDe services when formal XAdES certificate validation is required.

Questions

What is the difference between a Facturae .xml file and an .xsig file?

A .xml file contains the plain Facturae invoice data, whereas an .xsig file wraps or embeds an XAdES XML digital signature required for Spanish public administration portals. This viewer extracts and renders both formats identically.

How does the viewer calculate IRPF withholding on Spanish invoices?

The parser reads <TaxesWithheld> and <TotalTaxesWithheld> alongside output taxes. It subtracts the withheld IRPF amount from the tax-inclusive invoice total so the displayed payable figure matches <TotalExecutableAmount>.

What are FACe DIR3 codes inside a Facturae invoice?

DIR3 codes identify the three Spanish public administration units that process an invoice: Oficina Contable, Órgano Gestor, and Unidad Tramitadora. The viewer lists these codes under Schema details and Buyer reference when present.

Which Facturae schema versions can I open in this tool?

You can open Facturae 3.2, 3.2.1, and 3.2.2 files generated by Spanish accounting software or the official desktop application. UTF-8, ISO-8859-1, and Windows-1252 character encodings are decoded automatically.

Does this viewer verify the XAdES cryptographic signature?

No. The viewer unwraps XAdES XML structures to display the invoice and run arithmetic checks, but it does not validate certificate chains against Spanish trust lists. Use the official FACe or VALIDe portal for cryptographic signature verification.

Can I open Canary Islands IGIC invoices in Facturae format?

Yes. Facturae TaxTypeCode 03 is mapped directly to Canary Islands IGIC in the VAT breakdown alongside mainland IVA (01) and IRPF (04), and you can convert any Facturae XML or .xsig to PDF without uploading.

Updated