How to Open P7M File: Extract the Signed PDF or XML Invoice
A P7M file is a digitally signed "envelope" around a normal document, usually a PDF or an Italian electronic invoice (.xml.p7m). You can't open it by double-clicking because Windows and macOS don't know the format, but you don't need special software either: the free tool below extracts the original file in your browser, shows who signed it and when, and checks that the document hasn't been changed since it was signed. It also explains smime.p7m email attachments.
Choose what you need
Open P7M File Online: Extract & Check the Signature (Free)
Drop a .p7m file below. The tool unwraps the signature (binary, Base64, PEM or S/MIME, including double-signed .p7m.p7m files), lets you download the original document with its real extension, and previews PDFs, images, text and FatturaPA invoices. It also lists each signer's name, tax ID and certificate, shows the signing time, and checks that the content still matches the signature.
Good to know: the signature check confirms the file wasn't altered and the signature math is correct. It doesn't check whether the certificate is trusted or revoked; for that, use an official verifier (see below).
🔒 Nothing is uploaded — your file never leaves this deviceOn this page
What is a P7M file?
A P7M file is a document wrapped in a digital signature using the CMS (Cryptographic Message Syntax) format, the successor of PKCS #7. The original file is stored inside, unchanged, together with the signer's certificate and the signature itself. That's why the name usually has two extensions: contract.pdf.p7m is a signed PDF and IT01234567890_00001.xml.p7m is a signed XML invoice. Remove the signature layer and you get the original PDF or XML back.
P7M files are everywhere in Italy, where electronic invoices and documents signed with a qualified electronic signature (firma digitale) use the CAdES format, and they also appear in other EU countries and in encrypted or signed emails (S/MIME).
| Inside the .p7m | What it is |
|---|---|
| Signed content | The original file, byte for byte (PDF, XML, DOCX, image…) |
| Certificate | Who signed: name, tax code, organization, issuing authority, validity dates |
| Signed attributes | Signing time and a fingerprint (hash) of the content |
| Signature | The encrypted fingerprint that proves the content and signer belong together |
| Full name | PKCS #7 / CMS signed data (MIME type application/pkcs7-mime) |
|---|---|
| Standards | RFC 5652 (CMS), ETSI CAdES for advanced signatures |
| Variants | .p7m (signed or encrypted, content included), .p7s (signature only), .p7c / .p7b (certificates) |
| Related | .xml.p7m (Italian e-invoice), .pdf.p7m, smime.p7m (email) |
How to open a P7M file: quick answer
| What you want | How |
|---|---|
| Read the document inside | Use the tool above and download the extracted file |
| Read an Italian invoice | The tool shows seller, buyer, lines and totals and can save a readable HTML copy |
| Legally verify the signature | An official verifier such as the European Commission's DSS demo, or a signature app (Dike GoSign, ArubaSign) |
| Open smime.p7m from an email | Open the message in an email app that supports S/MIME, such as Outlook for Windows or Apple Mail |
Open P7M files on Windows, Mac and phone
The tool on this page works the same on every device, including iPhone and Android, because it runs in the browser. If you prefer an installed program:
- Windows and Mac: install a free signature app such as Dike GoSign (InfoCert) or ArubaSign (Aruba). Open the .p7m with it, check the signature and use its option to open or save the original document.
- Command line (any system with OpenSSL):
openssl cms -verify -noverify -inform DER -in file.pdf.p7m -out file.pdfextracts the content without checking the certificate chain. For a Base64 or PEM file, changeDERtoPEM. - Phones: the signature apps above have mobile versions, but the browser tool here is quicker for reading a document once.
Renaming document.pdf.p7m to document.pdf doesn't work: the signature data is still wrapped around the PDF, so PDF readers report the file as damaged. Extract it instead.
Italian electronic invoices (.xml.p7m)
Italy's electronic invoicing system (Sistema di Interscambio, SdI) accepts invoices in the FatturaPA XML format, either signed with CAdES-BES (the file ends in .xml.p7m) or with XAdES-BES (a plain .xml). File names follow a pattern such as IT01234567890_00001.xml.p7m: the country code and the sender's tax ID, then a progressive number.
- Drop the .xml.p7m into the tool above.
- Read the summary: document type and number, date, seller and buyer with VAT numbers, VAT breakdown, total, payment terms and the invoice lines.
- Click Download readable invoice (HTML) to save or print a copy, or Download to keep the XML.
The XML is the legal original; keep the .xml.p7m as you received it for your records and use the readable copy only for reading and printing. Invoices downloaded from the Agenzia delle Entrate portal can also be viewed there.
smime.p7m email attachments
If an email shows no text and only an attachment called smime.p7m, the sender signed or encrypted the message with S/MIME and your email app couldn't display it. The whole message, including its text and attachments, is inside that file.
- Signed only: the tool above can open it and shows the message's raw contents. Easier: open the email in an app with S/MIME support, such as Outlook for Windows, Apple Mail or Thunderbird.
- Encrypted: only the recipient's private key can open it, so the email must be opened on a computer or phone where your S/MIME certificate is installed. The tool tells you when a .p7m is encrypted and which certificate it was encrypted for.
Verify the signature officially
For legal purposes, a signature must be checked against trusted certificate lists and revocation data, which this page doesn't do. Use one of these:
- The European Commission's DSS demonstration web app: upload the .p7m and get a validation report against the EU trusted lists.
- Desktop signature apps from Italian trust service providers, such as Dike GoSign or ArubaSign.
The tool above is still useful first: it shows instantly whether the content was altered and who claims to have signed it.
P7M problems and fixes
"The file is damaged" in a PDF reader
The .p7m was renamed instead of extracted. Extract the original with the tool above.
The tool says the file is incomplete
The download or the email attachment was cut off. Download it again; in webmail, use "Download" rather than "Preview".
The content was "modified after signing"
The document doesn't match the signature fingerprint. Ask the sender for a fresh copy; don't rely on this one.
Certificate expired
A certificate that expired after the signing date doesn't automatically invalidate the signature, especially if the file has a timestamp. An official verifier decides this.
File ends in .p7m.p7m
The document was signed twice (for example by two people). The tool unwraps all layers and lists every signer.
A .p7s file instead of .p7m
A .p7s is a detached signature: the document is a separate file. Keep both; the tool shows the signer from the .p7s.
Sources and technical references
- RFC 5652: Cryptographic Message Syntax (CMS) — IETF
- RFC 8551: S/MIME 4.0 message specification (smime.p7m) — IETF
- Digital Signature Service (DSS) demonstration: validate a signature — European Commission
- Fatturazione elettronica: CAdES, estensione .xml.p7m — Edotto
- openssl-cms command — OpenSSL
Frequently asked questions
How do I open a P7M file?
Drop it into the free tool on this page: it extracts the original document, usually a PDF or an XML invoice, and lets you download it with the right extension. Signature apps such as Dike GoSign or ArubaSign, and OpenSSL on the command line, can extract it too.
Can I just rename a .p7m file to .pdf?
No. The signature data is wrapped around the PDF, so a renamed file looks damaged to PDF readers. Extract the original with the tool on this page or a signature app, and the PDF opens normally.
How do I open an .xml.p7m invoice?
Drop it into the tool on this page. It removes the signature, shows the invoice's seller, buyer, lines, VAT and total, and lets you download the XML or a readable HTML copy to print. Keep the original .xml.p7m for your records.
What is smime.p7m in an email?
It means the sender signed or encrypted the message with S/MIME and your email app couldn't display it. Open the email in an app with S/MIME support, such as Outlook for Windows, Apple Mail or Thunderbird. Encrypted messages need the recipient's certificate.
Is a P7M file safe to open?
Extracting it in the browser is safe: nothing runs. Treat the document inside like any other file: a valid signature proves who signed it and that it wasn't changed, not that its content is harmless.
How do I verify a P7M signature?
The tool on this page checks that the content wasn't changed and that the signature math is correct. For a legal check against trusted certificate lists and revocation, use the European Commission's DSS validation demo or a signature app such as Dike GoSign.
What's the difference between P7M and P7S?
A .p7m contains the signed document inside it. A .p7s is a detached signature that contains only the signature and certificate, while the document travels as a separate file.
Why does my file end in .p7m.p7m?
It was signed twice, usually by two different people. Each signature adds a layer. The tool on this page unwraps every layer and lists all the signers.
Last updated .