# Open a P7M file and see who signed it

> Got a .p7m file that will not open? Extract the signed document, see who signed it and when, and check it was not altered. Runs in your browser, no upload.

Free in-browser tool (no upload): https://www.mauriziofonte.it/tools/open-p7m-file

A file ending in **.p7m** is a digitally signed document sealed in an envelope, the standard way Italian offices, courts, suppliers and accountants sign their papers. Drop it here to get the **original document** back (PDF, XML, Word, image), see **who signed it** and **when**, check whether the certificate authority was **qualified**, and confirm **nothing changed** after signing. Everything happens **in your browser**, phone included: the file is never uploaded.

## How to open a .p7m file

1. **Drop the file** - Drag the .p7m file into the box, or tap it to pick the file from your phone or computer. Double extensions such as contract.pdf.p7m are fine.
2. **Read the result** - The top line says whether the document is intact and whether the signature matches the certificate. Below it you find the signer, their Italian tax code, the certificate authority, the signing date and any timestamp.
3. **Open or save the document** - The original document is extracted under its own name, without the .p7m extension. PDFs and images open straight away; other formats can be saved and opened with the right app.
4. **Keep the .p7m as well** - The .p7m you received is the signed original. The extracted file is a copy of the content without the signature, so keep the original .p7m too: only that file proves who signed.

## Why a .p7m will not open, and why upload is a bad idea

A .p7m file is an envelope. Inside sit the real document (usually a PDF, often an XML file, sometimes a Word file or an image), the digital signature and the signer's certificate. Windows, macOS, Android and iOS do not know the extension, so the file looks broken. It is not: take the envelope off and the document is there, with no need to install signing software from an Italian certificate authority.

Plenty of websites do the extraction by asking you to upload the file to their server. A signed document is often a contract, a power of attorney, a court filing or a payslip. Here the file is read by your browser and never leaves your device. You can check: open this page, switch off your connection, drop the file, and it still works.

Beyond extraction, the page runs three cryptographic checks with your browser's built-in WebCrypto functions. It recomputes the document's fingerprint and compares it with the signed one, so you learn whether anyone changed it after signing. It verifies that the signature was produced with the key of the enclosed certificate. And when a timestamp is present, it checks that it covers that very signature and is signed by the authority that issued it.

It then looks up the certificate authority in the European trust lists (eIDAS) and reports whether its service was qualified on the signing date, using the timestamp when there is one. The lists are refreshed daily on our server, which verifies their signatures; your browser downloads only the small slice it needs and sends nothing about your document. One limit, stated plainly: the page does not check whether the signer's own certificate was revoked or suspended before signing. For a full legal attestation, use one of the verifiers listed by AgID, the Italian digital agency.

## What a .p7m signature is worth outside Italy

A signature made with a **qualified certificate** has the same legal effect as a handwritten signature in every EU member state: that is Article 25 of the eIDAS Regulation (EU) No 910/2014. Italy adds its own rules in the Digital Administration Code (Legislative Decree 82/2005). The .p7m file is simply the container the signature travels in, so a document signed in Italy is recognised as signed elsewhere in the EU.

That is why the file to keep is the .p7m, not the extracted PDF. The PDF is the content; the proof that a given person signed it lives in the envelope. If you must forward the document as a signed document, forward the .p7m.

The signing date inside the envelope is declared by the signer's software and is not, on its own, a trusted date. A trusted date comes from a timestamp issued by an independent authority: when one is present the page shows it and checks that it refers to that signature. A timestamp is also what proves a signature was made while the certificate was still valid, long after the certificate itself has expired.

If the result says the document was modified, the content is no longer what was signed. Do not rely on it, and ask the sender for a fresh copy.

## Inside the envelope: CAdES, nested signatures, Base64

The format is called **CAdES**, a profile of the Cryptographic Message Syntax (CMS, RFC 5652) standardised by ETSI. Italian rules for signed documents date back to CNIPA Resolution No 45 of 21 May 2009 and are now aligned with the European ETSI standards. The envelope holds:

- the signed document, exactly as it was when signed;
- one or more certificates, the signer's and often the certificate authority's;
- for each signer, the document fingerprint (usually SHA-256), the declared signing time, a reference to the certificate used and the signature itself;
- optionally, a timestamp (RFC 3161) added after signing.

A file can carry several signatures. When several people sign the same document in parallel, their signatures share one envelope. When each person signs the file already signed by the previous one, envelopes nest and the name grows, for example contract.pdf.p7m.p7m: the page opens them all and lists every signature from the outermost in.

Italian certificates also carry the signer's **codice fiscale**, the Italian tax code, in the certificate's serialNumber field as TINIT- followed by the code: the page shows it next to the name. Some software saves the envelope as Base64 text instead of binary; the file then looks like gibberish but is the same content, and the page decodes it too.

A common case for foreign companies is the Italian e-invoice: a FatturaPA XML file signed as *invoice.xml.p7m*. The page extracts the XML and checks the signature; to read the invoice in a human layout, open the extracted XML in our Italian e-invoice viewer.

## Glossary

- **P7M**: Extension of files signed in CAdES format: an envelope holding the original document, the signature and the signer's certificate.
- **CAdES**: CMS Advanced Electronic Signatures, the CMS-based digital signature format used for .p7m files, defined by ETSI standards.
- **PAdES**: A signature format where the signature lives inside the PDF itself. A PAdES-signed PDF opens normally and has no .p7m extension.
- **Qualified certificate**: A signing certificate issued by a qualified trust service provider listed in the EU trust lists. Only a qualified signature has the legal effect of a handwritten one (eIDAS, art. 25).
- **Fingerprint (hash)**: A number computed from the document's content that changes if a single byte changes. The signature protects the fingerprint, and comparing it reveals any modification.
- **Timestamp**: A statement signed by an independent authority (TSA) that a given fingerprint existed at a given moment. It gives the signature a trusted date, independent of the signer's clock.
- **Codice fiscale**: The Italian tax code. In Italian signing certificates it sits in the serialNumber field as TINIT- followed by the code.
- **Nested envelope**: A file signed several times in sequence, with a repeated extension (.p7m.p7m): each signature wraps the file already signed by the previous one.

## Frequently asked questions

### What is a .p7m file?

A digitally signed document in CAdES format. It contains the original document, for example a PDF, sealed in an envelope together with the signature and the signer's certificate. To read it you extract the document from the envelope, which is what this page does.

### Why can't I open my .p7m file?

Your computer or phone does not recognise the .p7m extension and has no app assigned to it. The file is not damaged: it holds a normal document wrapped in a signature. Drop it here and you get the original document back with its own name and extension.

### How do I convert a P7M to PDF?

No conversion is needed: the PDF is already inside the envelope, identical to what was signed. Extracting it gives you the original PDF. Bear in mind the extracted PDF no longer carries the signature, so keep the .p7m if you need to prove the document is signed.

### Can I open a p7m file on iPhone or Android?

Yes. The page works in your phone's browser: tap the box, pick the file from downloads or mail attachments and the document is extracted. PDFs open straight away; other formats can be saved and opened with the right app.

### Is my file uploaded to a server?

No. Your browser reads the file on your device, and extraction and signature checks happen there. Nothing from the document is sent anywhere. Signed documents are often contracts or deeds full of personal data, and they have no reason to travel to someone else's server.

### If the check is green, is the document legally valid?

The page confirms the document was not altered, that the signature matches the enclosed certificate and whether the certificate authority was qualified on the signing date according to the EU trust lists. Revocation of the signer's certificate is not checked: for a full attestation use one of the verifiers listed by AgID.

### What does 'the document was modified after signing' mean?

The fingerprint computed on the enclosed document does not match the signed one: at least one byte differs from what the signer signed. The file may be damaged or tampered with. Do not use it as a signed document and ask the sender for a new copy.

### Who is the signer and what is the codice fiscale shown?

The signer is the person named in the certificate. Italian certificates also include their codice fiscale, the Italian tax code, which identifies them uniquely even when two people share the same name.

### What is a timestamp and where do I see it?

A statement signed by an independent authority that the signature existed at a given moment. It provides a trusted date, unlike the signing date declared by the signer's software. When present, the page shows date, time, the issuing authority and whether it refers to that signature.

### What is a .pdf.p7m.p7m file?

A document signed several times in sequence: each signer signed the file already signed by the previous one. The page opens every envelope, extracts the original document and lists each signature from the outermost to the innermost.

### I received an Italian e-invoice as .xml.p7m. How do I read it?

Drop it here to extract the XML and check the signature. To read the invoice in a readable layout, with supplier, lines, VAT rates and totals, open the extracted XML in our Italian e-invoice viewer, which also accepts the .p7m directly.

### What about .p7s and .m7m files?

They are different formats. A .p7s holds only a signature, detached from the document, or the signature of a certified email: the document is not inside. An .m7m bundles a .p7m with a timestamp in a single file. This page opens .p7m files, including those with a timestamp inside the envelope.

## Sources used

- [Regulation (EU) No 910/2014 (eIDAS)](https://eur-lex.europa.eu/eli/reg/2014/910/oj): Article 25, legal effect of qualified electronic signatures
- [AgID, signature verification software](https://www.agid.gov.it/it/piattaforme/firma-elettronica-qualificata/software-verifica): free verifiers of the Italian certificate authorities (page in Italian)
- [European Commission, eIDAS trust lists](https://eidas.ec.europa.eu/efda/trust-services/browse/eidas/tls): qualified trust service providers
- [RFC 5652, Cryptographic Message Syntax](https://www.rfc-editor.org/rfc/rfc5652): structure of the signed envelope
- [RFC 3161, Time-Stamp Protocol](https://www.rfc-editor.org/rfc/rfc3161): timestamp format
- [RFC 5035, ESS signingCertificateV2](https://www.rfc-editor.org/rfc/rfc5035): binding between signature and signer certificate

---
Tool by Maurizio Fonte, senior backend engineer. All tools: https://www.mauriziofonte.it/tools/
