.P7M

P7M File

PKCS#7 / S/MIME Message (digitally signed or encrypted)
Ask a question
QUICK ANSWER

A .p7m file is a PKCS#7/CMS container that wraps an original document - usually a PDF or XML e-invoice - together with a digital signature and/or encryption. To open it, use DiKe (InfoCert), Aruba Sign, Adobe Acrobat (PDF case), or OpenSSL; a plain text editor or simple rename to .pdf will not work because the document is still wrapped inside.

Developer: RSA Security (PKCS#7) / IETF (S/MIME, CMS - RFC 5652) Category: Security / Certificate Files Open standard MIME: application/pkcs7-mime
OPENS ON Windows macOS Linux Web
Related: .PEM · .CER · .REQ · .CRT

On this page

19k+ extensions indexed
Last reviewed Jun 27, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the P7M file format?

.p7m files are responsible for storing encrypted or digitally signed email messages and documents as a binary PKCS#7/CMS container. In such a file the content, any attachments, the cryptographic signature, and the signer's certificate chain are all stored together. The format is equally common as a general-purpose signed-document wrapper: an actual file - such as a PDF or an XML invoice - is embedded verbatim inside the .p7m shell, which adds the signature layer on top.

The container is normally DER-encoded binary (ASN.1 magic bytes 0x30 0x82 at offset 0); a Base64 text variant of the same structure also exists and starts with MII.... Unlike .p7s, which is a detached signature that keeps the source document separate, .p7m bundles the original document and signature into a single self-contained file.

Access to encrypted messages

.p7m files have one main purpose - protection of information contained within a message against unauthorised access by third parties. In order to read an encrypted .p7m it is required to possess a private key matching the public key that was used to seal the message. The recipient's private key stays the same across messages, so the target recipient has easy access to each new message without additional setup.

  • .p7m files are often used to send sensitive, protected data in medicine, financial, or business industries.
  • .p7m files use the Secure/Multipurpose Internet Mail Extensions (S/MIME) standard as their signing and encryption method; the underlying specification is CMS (RFC 5652).
  • In the EU - especially in Italy - .p7m is the standard container for CAdES (CMS Advanced Electronic Signatures) qualified e-signatures, which carry full legal weight.
  • Messages signed or encrypted in .p7m files usually appear under the filename smime.p7m.

Such .eml email messages provide only information within a header, with an empty content field visible to the mail client. The text and files of the message are contained within the encrypted or signed attachment itself. To extract the inner document or verify a signature without dedicated software, openssl smime -verify or openssl smime -decrypt are common command-line options.

Security & safety

RISK: MEDIUM

A .p7m is data, not a program, so it can't execute on its own - but it carries trust meaning that matters. For SIGNED .p7m files, 'opening' is safe, but the point is to VERIFY: a valid signature tells you who signed and that the document is unaltered; check that the signer's certificate is trusted and not expired/revoked, not just that 'a signature exists'. The inner document (e.g. a PDF) still deserves normal caution once extracted. For ENCRYPTED .p7m, you need YOUR private key to decrypt - never send your private key to anyone or upload a confidential/encrypted .p7m to a random online 'opener'. Prefer official verification services (Aruba/Agid) and local tools (Dike/OpenSSL) for sensitive documents.

Format details

in a nutshell
FULL NAMEPKCS#7 / S/MIME Message (digitally signed or encrypted)
DEVELOPERRSA Security (PKCS#7) / IETF (S/MIME, CMS - RFC 5652)since PKCS#7 (1990s); S/MIME / CMS standardized in RFC 5652. Heavily used for EU/Italian legal e-signatures (CAdES)
MIME TYPEapplication/pkcs7-mime
TYPEBinary PKCS#7/CMS container (usually DER-encoded), sometimes Base64; wraps the original file plus signature and/or encryption
STANDARDOpen · royalty-free
MAGIC BYTES · FILE SIGNATURE
OFFSET
0001
HEX
3082
ASCII
0·
A .p7m is normally a binary PKCS#7/CMS structure (DER), so it begins with the ASN.1 SEQUENCE tag 0x30 followed by a length, commonly 0x30 0x82 .... Some .p7m files are Base64-encoded text (then they start with "MII..."). The container wraps the ACTUAL document inside it together with a digital signature (signed-data) and/or encryption (enveloped-data) - the real file (a PDF, XML invoice, etc.) is extracted from within.

Programs that open P7M files

Windows4 apps
OpenSSL Open-source Extract the inner file: 'openssl smime -verify -in file.p7m -inform DER -noverify -out document.pdf' (or 'openssl cms ...'). Add -CAfile to actually validate the signer.
Dike (InfoCert) Free Italian/EU signed docs: open Dike, use the Verify/Open function, drag in the .p7m - it checks the signature and extracts the inner document. Free.
Aruba Sign Free Free Aruba digital-signature app: click Verify, select the .p7m, then view/save the enclosed document and signature details.
Adobe Acrobat Reader Free If the .p7m wraps a PDF, Acrobat can open the signed PDF and show signature status. Works for signed PDFs; not for arbitrary encrypted .p7m.
macOS3 apps
Aruba Sign / Dike Free Both ship macOS builds: verify the signature and extract the document the same way as on Windows.
OpenSSL / LibreSSL Open-source Terminal: 'openssl smime -verify -in file.p7m -inform DER -noverify -out out.pdf' to pull out the inner file. Pre-installed (LibreSSL).
Keychain Access (encrypted case) Built-in For an S/MIME ENCRYPTED .p7m, ensure your private key/cert is in the keychain so Mail can decrypt it. Not a standalone .p7m viewer.
Linux2 apps
OpenSSL Open-source Pre-installed: 'openssl cms -verify -in file.p7m -inform DER -noverify -out document.pdf' extracts the inner document; add -CAfile to validate the signature.
Aruba Sign Free Aruba provides a Linux build for verifying/extracting signed .p7m documents with a GUI.
Web1 app
Aruba / Agid online signature checkers Free Upload a .p7m to an official signature-verification service to view the document and signature validity. Avoid uploading encrypted/confidential files to third-party sites.

Technical details

deep spec
Container formatPKCS#7 / CMS (Cryptographic Message Syntax)
Governing specificationIETF RFC 5652 (CMS); earlier RFC 2315 (PKCS#7 v1.5)
MIME typeapplication/pkcs7-mime
Default S/MIME filenamesmime.p7m
Binary encodingDER (Distinguished Encoding Rules) - ASN.1 binary structure
Alternative encodingBase64 text (starts with “MII…”) - same CMS structure, different transport encoding
Magic bytes (DER)0x30 0x82 at file offset 0 - ASN.1 SEQUENCE tag followed by a 2-byte length field
CMS content typesSignedData, EnvelopedData (encrypted), SignedAndEnvelopedData, CompressedData
EU signature profileCAdES (CMS Advanced Electronic Signatures, ETSI EN 319 122) - supports qualified level under eIDAS
Embedded certificatesX.509 signer certificates and intermediate CA chain stored inside the container
Signing algorithmsRSA (PKCS#1 v1.5, PSS) and ECDSA; digest algorithms SHA-256, SHA-384, SHA-512
Encryption algorithmsAES-128 and AES-256 (CBC/GCM); Triple-DES for legacy compatibility
Inner documentAny file type (PDF, XML invoice, plain text, etc.) embedded verbatim and extractable
Decryption requirementRecipient's private key matching the X.509 public key certificate used during encryption
Legal useStandard qualified e-signature format for Italian public administration (PA), certified email (PEC), and EU cross-border documents
ReleasedPKCS#7 (1990s); S/MIME / CMS standardized in RFC 5652. Heavily used for EU/Italian legal e-signatures (CAdES)
Open standardYes · royalty-free
Specificationwww.rfc-editor.org

P7M conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with P7M files. Be specific - include your system and software version.
No account needed · answers usually within a day
I
INgs25 d agoUNANSWERED
Where to buy this license?
Waiting for an answer

Frequently asked questions

What is a .p7m file?
A digitally signed (and sometimes encrypted) document in PKCS#7/S/MIME format. The real file - often a PDF or an XML e-invoice - is wrapped inside, along with a signature proving who signed it and that it wasn't changed. It's the standard for legally valid e-signatures in Italy/EU.
How do I open a .p7m file?
Use a digital-signature tool that verifies and extracts the inner document: free DiKe (InfoCert) or Aruba Sign on Windows/Mac/Linux, Adobe Acrobat if it wraps a PDF, or OpenSSL ('openssl smime -verify -in file.p7m -inform DER -noverify -out out.pdf'). A plain text editor won't show the document.
Why is my file named something.pdf.p7m?
Because the .pdf is the original document and the .p7m is the digital-signature wrapper around it. Verify/extract the .p7m to get the inner PDF back; you can't just rename it to .pdf - it's still wrapped.
How do I extract the document from a .p7m without special software?
Use OpenSSL: 'openssl smime -verify -in file.p7m -inform DER -noverify -out document.pdf' (or 'openssl cms ...'). The -noverify flag skips trust checking just to extract; add -CAfile to also validate the signature.
Is a .p7m file encrypted or just signed?
Usually just SIGNED - the document is readable once you extract it, and the signature proves authenticity. Some .p7m files are ENCRYPTED (S/MIME), and those need the matching private key to decrypt. A signature tool or OpenSSL will tell you which it is.
Can I open a .p7m on my phone?
Yes - Aruba and InfoCert offer mobile apps to verify and view signed .p7m documents, and some PEC/e-invoice apps open them directly. For encrypted .p7m you still need your private key configured.

References

1RFC 5652 - Cryptographic Message Syntax (CMS/PKCS#7)www.rfc-editor.org
2InfoCert DiKe - free digital-signature softwarewww.firma.infocert.it

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.PARTPartial Download File
4.DATProgram Data File (generic)
5.BINCD/DVD Disc Image (BIN/CUE)
6.EXEWindows Executable (Portable Executable)
7.RPMSGRestricted Permission Message
8.NOMEDIAAndroid No-Media Marker File
9.MDMarkdown Document
10.TMPTemporary File

Related extensions

.PEMPEM - Base64-encoded certificate / key container (X.509, PKCS)
.CERSecurity certificate (X.509 .cer)
.REQCertificate Signing Request (CSR) - .req
.CRTSecurity certificate (X.509 .crt)
.CSRCertificate Signing Request (PKCS#10)

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z