P7M viewer: open a .p7m file

A .p7m file is a document wrapped in a digital signature: an Italian e-invoice (.xml.p7m), a contract or a certificate (.pdf.p7m), any file signed with a smart card or a remote signature. Open it here to take the document out, see who signed it, and read or save it, without installing a signing program. Everything runs in your browser

Signed document

Open a .p7m above: the document inside is shown here, with who signed it

Reading the signature

Document
Type
·
Signed by
(signature not verified)

What a .p7m file is

A .p7m file is a CAdES signature in the "enveloping" form: a PKCS#7 / CMS SignedData structure that carries the signed document inside it, together with the signer's certificate and the signature itself. The original name stays in front of the extension, so contratto.pdf.p7m holds a PDF and IT01234567890_00001.xml.p7m an XML invoice. A file signed twice ends in .p7m.p7m.

In Italy they are everywhere: the SdI, the Revenue Agency's exchange system, delivers most FatturaPA invoices signed this way, and documents sent by certified email (PEC), notaries, courts and public offices are often signed with a qualified signature (firma digitale) the same way. Windows and macOS do not open them by themselves, which is why "how do I open a p7m file" is such a common question.

How it works

  1. Drop the .p7m on the box above, or choose it. It may be binary (DER) or Base64 text, as some mail programs save it.
  2. The page unwraps the signature, as many times as the file was signed, and shows who signed it, as each certificate names the signer.
  3. A PDF is shown on the page, an image too; an XML invoice is laid out as an invoice by the e-invoice viewer, with its Full view of every field of a FatturaPA. Save the document saves what was inside under its own name, ready to open in the program it belongs to: Word, Excel, a PDF reader.

Opening is not verifying

The page reads the signature to take the document out and name the signer; it does not check that the signature is valid, that the certificate was issued by a qualified provider or that it was not revoked when the document was signed. For that, use the verification service of a qualified trust service provider or the free tools the Agency for Digital Italy (AgID) lists. For an invoice, open the XML in the validator to check it against the FatturaPA schema and the SdI's rules.

Questions

Is my file uploaded?

No. The .p7m is read in your browser: the signature is unwrapped, the PDF shown and the invoice laid out there. Nothing leaves your computer.

Which files does it open?

Any .p7m in the enveloping CAdES form, the one Italian signing tools and the SdI write, binary or Base64, signed once or more. Inside it can be anything: a PDF, an XML invoice, a Word or Excel file, an image. A detached signature (a .p7s next to the document) holds no document, and the page says so.

Can I open a .p7m in Adobe Reader?

Only with a plug-in for Italian digital signatures. Here you get the PDF out of the .p7m and open it in any PDF reader, Adobe Reader included.

Is the signature checked?

No: the page names the signer from the certificate but does not verify the signature or the certificate. Use a qualified provider's verification service when the signature itself matters.

What about an invoice that is not signed?

Open the plain .xml in the e-invoice viewer: it reads FatturaPA, XRechnung, ZUGFeRD, Peppol and KSeF invoices, signed or not.

Other tools

  • XML formatter: Pretty-print or minify XML, keeping text, CDATA and comments as written.
  • XML viewer: Read a document as a tree you can fold, search and copy XPaths from.
  • XPath tester: Evaluate XPath 3.1 against a document and see each match with its line.
  • XSD generator: Infer an XML Schema from sample documents, checked against them.
  • XML from XSD: Generate a sample XML document from a schema, validated against it.
  • XSLT transformer: Run XSLT 1.0, 2.0 or 3.0 on a document and see the result, the messages and the files it writes.
  • XML diff: Compare two XML documents as trees: changed, added and removed elements, attributes and text.
  • XML to JSON converter: Convert XML to JSON, with arrays where an element repeats or wherever its XSD allows.
  • JSON to XML converter: Convert JSON to XML: @keys become attributes, arrays repeated elements.
  • XML to CSV converter: Turn a repeating element into CSV rows: invoice lines, products, records.
  • XML to PDF converter: Save any XML as a PDF to read, print or attach: indented, coloured, with line numbers.
  • E-invoice viewer: Read an XRechnung, ZUGFeRD, Factur-X or Peppol invoice as a document, and save it as a PDF.
  • ZUGFeRD validator: Check a ZUGFeRD or Factur-X PDF: the XML inside against its profile's rules, and the PDF around it.
  • XRechnung validator: Check an XRechnung in UBL or CII against EN 16931 and KoSIT's XRechnung rules before you send it.
  • UBL validator: Check a UBL invoice, order or any other UBL 2.1 document against its OASIS schema, and the business rules of the profile it names.
  • Peppol validator: Check a Peppol BIS Billing 3.0 or PINT invoice against the OpenPeppol rules before your access point sends it.
  • XRechnung examples to download: Example XRechnung and ZUGFeRD invoices to download, one for each common case.
  • E-invoicing mandate in Germany: do I have to?: Find out whether your invoices in Germany must be e-invoices in 2026, 2027 and from 2028.
  • Factur-X examples: Example Factur-X invoices of every profile and of the French reform, as XML and as PDF.
  • Leitweg-ID check: Check the form and the check digits of a Leitweg-ID, the address of a German public buyer.
  • Peppol lookup: Check whether a company is registered in Peppol, under which ID, and which invoices it can receive.
  • XML validator: check a document against XSD, DTD, RelaxNG or Schematron, up to 1 GB.