P7M XML
File conversion

Convert P7M to XML

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

Run openssl smime -verify -in invoice.xml.p7m -inform DER -noverify -out invoice.xml or use Dike (InfoCert) to extract the inner .xml. The extracted file is bit-for-bit identical to the file that was signed.

Also to XML: IEPD · XHTML · TSI

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 XML?

Italian electronic invoices sent via SDI (Sistema di Interscambio) arrive as XML files signed and wrapped in .p7m format. To import the invoice into accounting software or process it programmatically, you must unwrap the .p7m to access the raw .xml. The XML was always inside the container - extraction is not a format conversion.

How to convert P7M to XML

OpenSSL OPEN-SOURCE

Run openssl smime -verify -in invoice.xml.p7m -inform DER -noverify -out invoice.xml to extract the inner .xml; substitute openssl cms with the same flags if that command fails.

Dike (InfoCert) FREE

Open Dike, drag the .p7m file onto the window, and click Save Document or Extract after verification to save the inner .xml file.

Aruba Sign FREE

Open Aruba Sign, click Verify, select the .p7m, then use Save or View Document to export the inner .xml.

About these formats

Quality & what to watch

  • The extracted XML is identical to the original - no data is altered or lost during extraction.
  • Once extracted, the XML is unsigned; keep the original .p7m if you need legal proof that the document was signed.
  • If extraction fails, try replacing -inform DER with -inform PEM in the OpenSSL command - some .p7m files are Base64-encoded rather than binary DER.

Frequently asked questions

Why do Italian e-invoices arrive as `.p7m` instead of plain `.xml`?
Italian tax law requires invoices transmitted via SDI to carry a CAdES digital signature, which wraps the XML in a .p7m container.
Can I extract the XML without validating the signature?
Yes - the -noverify flag in the OpenSSL command skips trust-chain checking so you get the file out even without CA certificates installed.
Will the extracted XML import correctly into accounting software?
Yes - the extracted file is identical to the original XML that was signed, so any software that accepts the standard format will import it normally.