Automation MCP Server Features Blog Pricing Contact

Extract XML from Factur-X / ZUGFeRD API

Upload a Factur-X or ZUGFeRD PDF and extract the embedded CII XML invoice data instantly, no sign-up required.

Drop your Factur-X or ZUGFeRD PDF here

or browse files to upload

Accepted format: PDF · Max 20 MB

How Factur-X / ZUGFeRD XML Extraction Works

Upload Your Hybrid PDF

Drag and drop a Factur-X or ZUGFeRD PDF. We detect the embedded XML attachment automatically, no matter which branding the file uses.

Parse & Extract

The embedded CII XML (factur-x.xml, zugferd-invoice.xml, or xrechnung.xml) is pulled byte-for-byte from the PDF/A-3 container. No transformation, no reformatting.

Download XML

Receive a structured EN 16931 CII XML file, ready to import into your ERP, accounting system, or data pipeline.

Why Extract XML from Factur-X or ZUGFeRD?

Factur-X and ZUGFeRD invoices embed structured XML inside a standard PDF, but many accounting systems can only process the raw XML data. Extracting the XML lets you automate data import, eliminate manual entry, and integrate invoice data directly into your ERP or financial workflows. Whether you're archiving, validating, or feeding data into a pipeline, the extracted XML gives you machine-readable access to every field in the invoice. The same extractor handles both formats, since Factur-X and ZUGFeRD 2.x share an identical PDF/A-3 + CII XML container.

Developer API

Built for Developers

A single REST endpoint. Upload a Factur-X or ZUGFeRD PDF, receive the embedded CII XML byte-for-byte. No transformation, no AI.

  • Supports all formats: DOCX, XLSX, PDF, images, no preprocessing needed
  • Works on scanned and photographed invoices
  • Every response validated against official Schematron rules

Supports ZUGFeRD · Factur-X · XRechnung · UBL · CII · EN 16931

API Documentation
Terminal
$ curl -X POST https://api.invoicexml.com/v1/extract/xml \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: multipart/form-data" \
  -F "[email protected]"

// => 200 OK
// => { "id": "inv_8f3k...", "status": "completed" }

Frequently Asked Questions

Does this work with Factur-X and ZUGFeRD?

Yes. Factur-X and ZUGFeRD 2.x use the same PDF/A-3 + CII XML container and are detected automatically. The extractor recognises all three spec attachment names, factur-x.xml, the legacy zugferd-invoice.xml, and xrechnung.xml (the ZUGFeRD XRechnung reference profile), and returns the embedded XML as-is.

What if my PDF has no embedded XML?

If the uploaded PDF does not contain an embedded CII XML attachment, use the AI Parse endpoint (/v1/parse/json) to read the visible invoice content, map it to the EN 16931 data model, and return structured invoice data.

What XML format is returned?

The extracted XML follows the UN/CEFACT CII (Cross Industry Invoice) format, the same syntax used inside Factur-X and ZUGFeRD files and one of the two official syntaxes of the EN 16931 European standard.

Is the extracted XML validated?

No. The XML is returned byte-for-byte from the PDF attachment. Pass it through /v1/validate/facturx, /v1/validate/zugferd, or /v1/validate/cii for a full Schematron validation pass.

Start free today

Ready to automate your invoices?

Validate, convert and embed compliant e-invoices through one API. Start your 30-day free trial. No credit card required.

GDPR Compliant No credit card required Setup in minutes
Peppol UBL
Factur-X
EN 16931
142 / 142 passed
Compliant
PDF/A-3 embedded