Skip to content

PHP libraries for e-invoices: which one fits your project?

Six open-source libraries for ZUGFeRD, XRechnung and Peppol in PHP: what they create, read and validate, which PHP version they need and when each one fits.

Comparison13 Nov 2026 · about 7 minutes

In short

For plain CII XML (ZUGFeRD, Factur-X, XRechnung CII), horstoeko/zugferd is the most widely used library; its author recommends the successor horstoeko/invoicesuite for new projects. For UBL and Peppol there are num-num/ubl-invoice and josemmo/einvoicing. atgp/factur-x combines a finished XML with an existing PDF. easybill/zugferd-php maps ZUGFeRD XML to PHP objects and back. Quittio creates CII and UBL including the PDF/A-3 from one data model, reads and validates, but is young and needs PHP 8.3. As of 13 Nov 2026.

Disclosure

This page belongs to Quittio, one of the libraries compared. The details about the others come from their Packagist entries, GitHub repositories and READMEs, fetched on 13 Nov 2026, and are linked below. “Not described” means: not in the README or docs, not necessarily that it is missing. If something is wrong, let us know.

What matters

  • Syntax: ZUGFeRD, Factur-X and XRechnung CII need CII. Peppol BIS Billing 3.0 and XRechnung UBL need UBL.
  • PDF: a ZUGFeRD invoice is a PDF/A-3 with embedded XML. Some libraries create the PDF themselves, others attach the XML to a PDF your system already produces.
  • Reading: since 2025 every business in Germany must be able to receive e-invoices. That needs a reader for XML and for the XML embedded in a PDF.
  • Validation: XSD only checks the structure. The business rules of EN 16931 and XRechnung are Schematron; the official tool is the KoSIT validator (Java).
  • PHP version and framework: from PHP 7.1 to 8.3; two of the libraries have a Laravel integration.

Features at a glance

LibraryCreatesReadsPDFValidates
horstoeko/zugferdCII: ZUGFeRD/Factur-X MINIMUM to EXTENDED, XRechnung. No UBLXML and PDFattaches the XML to an existing PDFXSD; KoSIT validator (Java, experimental according to the wiki)
easybill/zugferd-phpCII XML from PHP objects (ZUGFeRD 1 and 2)CII XML into PHP objectsnot describednot described (XSD files in the package)
josemmo/einvoicingUBL according to EN 16931, with presets for Peppol and several national CIUS. CII open on the roadmapUBLnot describedown business rule checks (validate())
num-num/ubl-invoiceUBL 2.1, EN 16931, Peppol BIS Billing 3.0UBL (since 2.0)not describedXSD with your own code (example in the docs)
atgp/factur-xcreates no XML, takes a finished Factur-X XMLextracts the XML from a Factur-X PDFattaches the XML to an existing PDFXSD (official Factur-X schemas)
QuittioCII and UBL: ZUGFeRD/Factur-X, XRechnung 3.0 (with quittio/country-de), Peppol BIS Billing 3.0XML and PDF, into the same data modelcreates the PDF/A-3 itself (template) with embedded XMLrules of EN 16931, XRechnung, Peppol and German VAT law in PHP, XSD; KoSIT validator and veraPDF optional

Licence, PHP version and adoption

PackageLicencePHPLatest versionDownloadsGitHub stars
horstoeko/zugferdMIT7.3+1.0.135 of 8 Nov 2026about 9.6 million447
easybill/zugferd-phpMIT8.3+6.0.0 of 30 Mar 2026about 401,000102
josemmo/einvoicingMIT7.1+0.3.1 of 9 Jun 2025about 553,000179
num-num/ubl-invoiceMIT7.4+2.4.1 of 9 Feb 2026about 1.17 million143
atgp/factur-xMIT7.4+3.5.0 of 18 Aug 2026about 1.10 million153
quittio/quittioMIT8.3+1.0.0 of 27 Oct 2026about 44041

Downloads: total according to Packagist, rounded. All figures as of 13 Nov 2026.

When each library fits

horstoeko/zugferd

The most widely used PHP library for ZUGFeRD and actively maintained. A good choice if you want to write or read CII XML and the PDF already comes from your system. UBL is covered by the separate package horstoeko/zugferdublbridge, Laravel by horstoeko/zugferd-laravel (latest version 1.0.5 of 15 Mar 2025). According to its README, horstoeko/invoicesuite is the official successor and recommended for new projects; it is at version 0.0.41 and needs PHP 8.2.

easybill/zugferd-php

Maps ZUGFeRD XML (versions 1 and 2) to PHP objects and back, using jms/serializer. A fit if you want to work close to the XML and handle calculation and PDF yourself. The same vendor publishes easybill/e-invoicing for reading and creating EN 16931 invoices (version 0.4.0).

josemmo/einvoicing

Writes and reads UBL according to EN 16931 and checks its own business rules. There are presets for Peppol and for national variants from Austria, Spain, Italy, Romania and the Netherlands. CII is still on the roadmap. Runs on PHP 7.1 and later.

num-num/ubl-invoice

Object-oriented creation and, since version 2.0, reading of UBL files for EN 16931 and Peppol BIS Billing 3.0. Its README says itself that it does not cover every feature of UBL and Peppol.

atgp/factur-x

A fit when XML and PDF already exist: the library combines both into a Factur-X/ZUGFeRD file, extracts the XML from such a PDF and checks it against the XSD. You create the XML itself elsewhere.

Quittio

A fit if you want to create the whole invoice from one data model: calculation according to EN 16931, XML in CII or UBL, PDF/A-3 from a template, validation before sending and reading incoming invoices. The core runs without a framework, and there is a Laravel integration. Limits: Quittio is young (1.0.0 since 27 Oct 2026, few downloads), needs PHP 8.3, and the country packs other than Germany have not been reviewed by a tax adviser yet. More on E-invoices with PHP.

What about Symfony?

Packagist has no Symfony bundle that creates ZUGFeRD or XRechnung invoices (search of 13 Nov 2026). That is no obstacle: all libraries here are framework-agnostic and can be registered as a service. A tested example for Quittio is under Using it in Symfony.

Frequently asked questions

Which PHP library for ZUGFeRD is the most widely used?

horstoeko/zugferd with about 9.6 million downloads on Packagist (as of 13 Nov 2026). It writes and reads CII; its author recommends the successor horstoeko/invoicesuite for new projects.

Which library also creates the PDF?

horstoeko/zugferd and atgp/factur-x attach the XML to an existing PDF. Quittio creates the PDF/A-3 itself from a template. For the others a PDF is not described.

Which library do I use for Peppol?

Peppol BIS Billing 3.0 is UBL. num-num/ubl-invoice, josemmo/einvoicing and Quittio support it.

Is there a Symfony bundle for ZUGFeRD or XRechnung?

Not on Packagist (as of 13 Nov 2026). The libraries are framework-agnostic; Quittio is registered as a service in a few lines, see E-invoices with PHP.

Is this comparison neutral?

It comes from Quittio, one of the libraries compared. That is why every detail about the others is dated and linked. We are happy to take corrections through the contact page.

Try it yourself.

One Composer command, one script, one validated e-invoice.