P7M P7S
File conversion

Convert P7M to P7S

QUICK ANSWER
Is it possible to convert P7M to P7S?
Yes - P7M converts to P7S.

Use OpenSSL in two steps: first extract the inner document from the .p7m, then re-sign it with your certificate to produce a detached .p7s. Most users who receive a .p7m only need to extract the document inside, not produce a .p7s.

On this page

Tested on macOS, Windows & Linux
Last verified Oct 2026

More free converters

HEIC, PNG, WEBP, MP3 and more - every tool here is free.

Open the toolbox

Why convert P7M to P7S?

A .p7m is an embedded-signature container where the document and signature are bundled together. A .p7s is a detached signature that lives in a separate file beside the original document. Both use the same PKCS#7/CMS standard (RFC 5652). Some systems or archives require detached signatures rather than embedded ones, making this workflow necessary in specific technical integrations.

How to convert P7M to P7S

OpenSSL OPEN-SOURCE

Extract the inner document with openssl smime -verify -in document.p7m -inform DER -noverify -out inner.pdf, then create the detached signature with openssl cms -sign -in inner.pdf -signer cert.pem -inkey key.pem -out signature.p7s -outform DER -detach.

About these formats

Quality & what to watch

  • Re-signing breaks the original signature - the new .p7s is signed by your certificate, not the original signer's.
  • If preserving the original signer's proof is a legal requirement, keep the .p7m as the authoritative record and do not re-sign.
  • No GUI application in common use performs this specific conversion; it is a niche technical workflow handled only at the command line.

Frequently asked questions

Why is OpenSSL the only tool for this?
No GUI application in common use performs this specific .p7m-to-.p7s workflow; it requires command-line access to cryptographic signing operations.
Is the signature in a `.p7s` the same as in the original `.p7m`?
No - re-signing creates a new signature under your own certificate. The original signer's cryptographic proof is not preserved.
What is the difference between `.p7m` and `.p7s`?
Both use PKCS#7/CMS: .p7m embeds the document content inside the signature container, while .p7s is a separate sidecar file that references the document externally.