Skip to content

FatturaPA viewer (.xml & .p7m)

Open Italian FatturaPA (.xml and signed .xml.p7m) invoices in readable form, unwrap the inner XML and export a clean PDF.

Drop an Italian FatturaPA (.xml or .xml.p7m) file here

Unwraps CAdES-signed .xml.p7m and plain FPR12 / FPA12 XML files locally, checks Partita IVA and SdI fields, and saves a readable PDF.

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

How to use FatturaPA viewer (.xml & .p7m)

  1. Drop your FatturaPA file. Drag a .xml or .xml.p7m file onto Drop an Italian FatturaPA (.xml or .xml.p7m) file here, or click Choose a file.
  2. Inspect SdI and tax details. Review SdI transmission format, Codice Destinatario (SdI), Regime Fiscale, Natura exemptions, ritenuta d'acconto, and split payment IVA.
  3. Check arithmetic consistency. Read the Checks panel at the top to verify line sums, VAT breakdown, and <ImportoPagamento>.
  4. Save PDF or unwrapped XML. Click Save as PDF for a printable copy, Download unwrapped XML to extract the inner .xml, or Open another for the next file.

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

How does the viewer unwrap CAdES .xml.p7m envelopes locally?

This FatturaPA viewer (visualizzatore fattura elettronica) inspects the leading bytes of your .xml.p7m file, strips optional Base64 or PEM headers, and walks the ASN.1 TLV structure inside a Web Worker until it locates the embedded <FatturaElettronica> XML bytes. Zero bytes leave your computer during unwrapping or PDF generation.

Decoding DER, BER indefinite-length, and Base64 .p7m files

Italian signing software produces .p7m envelopes in several valid variants under the IETF RFC 5652 Cryptographic Message Syntax standard. Some tools emit strict DER octet strings, while others emit Base64-wrapped payloads or BER indefinite-length (0x80) constructed octet strings (0x24).

Our ASN.1 reader inspects constructed envelopes up to depth 24, collects chunked octet strings, and skips indefinite-length terminators cleanly. You do not need to install Aruba, InfoCert, or desktop Java utilities just to read an incoming supplier .p7m invoice. If you also inspect pan-European UBL, CII, or Factur-X invoices, open them in our browser-based e-invoice viewer.

Handling UTF-8 and legacy Windows-1252 XML encodings

Once extracted, the decoder reads the XML declaration encoding attribute before converting bytes to text. Files declared as ISO-8859-1, Latin1, or Windows-1252 are decoded accurately alongside standard UTF-8, preserving accented Italian descriptions and euro symbols.

Central European supplier invoices declared as ISO-8859-2 or Windows-1250 are decoded as well, preventing garbled characters in item tables. Trailing whitespace or PEM armor headers around Base64-encoded .p7m attachments are stripped automatically before ASN.1 parsing begins.

FPA12, FPR12, and SdI transmission fields explained

Every FatturaPA file carries routing and tax-regime metadata inside <FatturaElettronicaHeader> and <DatiGeneraliDocumento>. According to the FatturaPA Official XML Format Documentation, <FormatoTrasmissione> distinguishes public-sector FPA12, private FPR12, and simplified FSM10 invoices.

Each transmission block also identifies the document type (TD01 standard invoice, TD04 credit note, TD24 deferred invoice, or TD06 professional fee), payment method (MP05 wire transfer, MP08 card, MP19 SEPA direct debit), and seller regime.

XML field or code Role in FatturaPA How the viewer displays it
FPA12 / FPR12 / FSM10 SdI transmission format Shown in the top format bar and Schema details
CodiceDestinatario 6-char PA or 7-char B2B routing code Displayed under Schema details and Buyer reference
PECDestinatario Certified email fallback (0000000) Listed under Schema details when populated
TipoDocumento (TD01–TD25) Invoice, credit note, deferred invoice Mapped to UNTDID codes (380, 381, 386, 389)
RegimeFiscale (RF01–RF19) Seller’s Italian tax regime Shown in Schema details for quick audit checks

Before posting a vendor or customer invoice into your accounting ledger, you can validate 11-digit Italian Partita IVA checksums offline to catch transposed digits.

Ritenuta d’acconto, split payment IVA, and Natura codes

Italian invoices frequently include statutory deductions and zero-rate exemptions that differ from standard VAT math. Under the Agenzia delle Entrate Fatturazione Elettronica Portal, Sistema di Interscambio (SdI) enforces strict validation rules on these blocks.

Reconciling DatiRitenuta and PA split payment against ImportoPagamento

Professional invoices subject to ritenuta d'acconto (<DatiRitenuta>) require the buyer to withhold income tax and pay the net balance. Similarly, invoices to public administrations marked EsigibilitaIVA = S (scissione dei pagamenti) transfer VAT payment directly to the state.

This viewer subtracts both DatiRitenuta and split-payment VAT from the gross document total so the net balance matches <ImportoPagamento> in <DatiPagamento>. Purchase order IDs from <DatiOrdineAcquisto> along with CIG and CUP public tender codes appear in the header, complementing workflows where you prepare supplier purchase orders before billing.

Mapping Natura codes N1 through N7 and Bollo virtuale

When a line item or summary block carries 0% VAT, Italian law requires a <Natura> code explaining the exemption. The parser maps N1 and N2 to outside-scope (O), N3.1 to exports (G), N3.2 to intra-EU supplies (K), N4, N5, and N7 to exempt (E), and N6 to reverse charge (AE).

If <DatiBollo> indicates virtual stamp duty (Bollo virtuale), the viewer displays the 2.00 EUR (or stated) stamp duty in Schema details and accounts for it in <ImportoPagamento>.

Saving readable PDFs and unwrapped XML copies

After opening a file (aprire xml.p7m or plain .xml), the Checks section validates totals, VAT breakdowns, and mandatory party fields against core EN 16931 rules.

Exporting printable PDFs and clean .xml payloads

Click Save as PDF to render a clean A4 invoice PDF inside a Web Worker, or click Full preview to inspect the pages before saving. Clicking Download unwrapped XML saves the extracted .xml file locally whenever you opened a .xml.p7m envelope, ready for ERP import or bookkeeping review.

Tip: Always archive the original signed .xml.p7m file alongside the readable PDF, because Italian statutory retention (conservazione sostitutiva) requires preserving the signed electronic original for 10 years.

Archival retention and cryptographic signature boundaries

All ASN.1 unwrapping, XML decoding, and PDF rendering execute locally with 0 KB sent over the network, keeping sensitive supplier pricing, Partita IVA identifiers, and IBAN coordinates private on your device. If you also review Spanish electronic invoices in .xml or XAdES .xsig format, open them in our Facturae XML viewer.

Note that this viewer inspects XML fields and arithmetic for operational convenience rather than certified legal or tax advice; use official SdI or qualified trust services when formal CAdES signature verification is required.

Questions

How does this viewer open signed .xml.p7m files without uploading them?

CAdES .p7m files wrap the XML invoice inside an ASN.1 CMS SignedData envelope. This viewer parses DER, BER indefinite-length, and Base64 structures directly inside a browser Web Worker so you can open .p7m files without Aruba or InfoCert desktop software.

What is the difference between FPA12 and FPR12 in FatturaPA?

FPA12 identifies invoices addressed to Italian Public Administrations using a 6-character office code. FPR12 identifies B2B and B2C invoices routed through SdI electronic invoicing using a 7-character Codice Destinatario or PEC address.

Are ritenuta d'acconto and split payment IVA deducted from the payable total?

Yes. Withholding tax in <DatiRitenuta> and public-administration split payment VAT (EsigibilitaIVA = S) are shown separately and subtracted from the payable amount, alongside common TipoDocumento codes such as TD01 and TD04, so totals match <ImportoPagamento>.

Can I download the unwrapped XML from a .p7m invoice?

Yes. When you open a CAdES-signed .xml.p7m file, click Download unwrapped XML in the top bar to save the clean inner .xml document to your device.

What do Natura exemption codes N1 through N7 mean?

Natura codes explain why a line carries 0% VAT under Italian law, such as N1 excluded, N2 not subject, N3 non-taxable exports, N4 exempt, N5 margin scheme, N6 reverse charge, and N7 VAT paid in another EU state.

Does opening a .p7m file here verify the Italian digital signature?

No. The viewer extracts the XML payload and checks invoice arithmetic, but it does not validate qualified CAdES signer certificates against EU trust lists. Use official Italian validation tools when cryptographic signature proof is needed.

Updated