How to use the E-invoice viewer tool
- Choose an .xml, .pdf or .p7m file under Invoice file, or paste the XML into Invoice XML. If you provide both, the file is used.
- Select Read invoice. Select Example to load a minimal UBL invoice.
- Read the format, invoice number, issue date, seller, buyer, total and line count in the Result box.
- Select Download to save the XML as invoice.xml, which is useful when it was embedded in a PDF or P7M file. Select Copy for the summary.
How the e-invoice viewer detects the format
An e-invoice is structured data, not a picture of a document. UBL and CII are the two syntaxes of the European standard EN 16931, and FatturaPA is Italy's national format.
The tool parses the XML and picks a reader from the root element. Anything else, including an Invoice element with no namespace, is rejected with the message Expected a UBL, CII or FatturaPA invoice. These roots are recognized.
- Invoice or CreditNote in an OASIS UBL namespace is read as UBL. This covers Peppol BIS Billing and the UBL flavor of XRechnung.
- CrossIndustryInvoice is read as UN/CEFACT Cross Industry Invoice (CII). This covers Factur-X, ZUGFeRD 2 and the CII flavor of XRechnung.
- FatturaElettronica is read as Italian FatturaPA.
Containers: plain XML, hybrid PDF and signed P7M
Invoices often arrive wrapped. A Factur-X or ZUGFeRD invoice is a PDF with the XML attached inside. The tool recognizes a PDF by its first bytes, searches the associated files and the embedded file tree for an attachment ending in .xml, and prefers names containing factur-x, zugferd or xrechnung.
A file whose name ends in .p7m is treated as a CMS signed envelope, the usual wrapper for Italian invoices, and the enclosed document is extracted. The result then includes a Container line. The signature is not verified. XML files are decoded as UTF-8, UTF-16 or the encoding named in the XML declaration.
Example output
The Example button loads a small UBL invoice with an ID, an issue date, a currency code and a payable amount. Lines for fields that are absent, here the seller, buyer and profile, are omitted.
Format: UBL Invoice
Invoice number: INV-001
Issue date: 2026-01-12
Total: 119.00 EUR
Line items: 0Fields shown and limits
The viewer is a quick inspector, not a renderer or validator. It does not list line details, tax breakdowns, payment terms or attachments.
- Total is the amount due: PayableAmount in UBL, DuePayableAmount or else GrandTotalAmount in CII, ImportoTotaleDocumento in FatturaPA.
- Profile shows the UBL CustomizationID or the CII guideline ID when present.
- CII dates appear as stored, usually eight digits such as 20260115.
- Uploaded files may be up to 30 MiB and the XML up to 8 million characters.
- XML containing a DOCTYPE or entity declaration is refused.
Frequently asked questions
How do I open an XML invoice so I can read it?
Choose the file or paste its content and select Read invoice. The tool shows the invoice number, date, seller, buyer, total with currency and the number of lines as labeled text.
Which e-invoice formats does this viewer support?
UBL invoices and credit notes, UN/CEFACT CII invoices and Italian FatturaPA. That includes XRechnung, Peppol BIS Billing, Factur-X and ZUGFeRD 2 files, as XML or embedded in a PDF, and FatturaPA signed as P7M.
Can it extract the XML from a ZUGFeRD or Factur-X PDF?
Yes. Choose the PDF and select Read invoice. If an XML attachment is found, its fields are shown and the Download link saves the attachment as invoice.xml.
Why do I get Expected a UBL, CII or FatturaPA invoice?
The XML is well formed but its root element is not one the tool knows. Common causes are an envelope around the invoice, an order or other document type, a ZUGFeRD 1.0 file whose root is CrossIndustryDocument, or a UBL file without its namespace.
Is my invoice uploaded to a server?
No. The file is read with JavaScript in your browser, including PDF attachment extraction and P7M unwrapping. The invoice data does not leave your device.
Does the viewer validate the invoice?
No. It only reads fields. An invoice can display correctly here and still fail EN 16931 or national business rules, so use a full validator for conformance.