Free and open source tool chain for generating EN16931 conforming e-invoices (Factur-X/ZUGFeRD, UBL, CII, XRechnung) from popular spreadsheet formats or JSON with free and open source software.
Electronic invoicing in the EU is mandatory, but most available solutions are proprietary, commercial, closed, and costly. E-Invoice-EU takes a different approach:
- β 100% free & open source β no licence fees, no vendor lock-in
- β Standards-compliant β EN16931, Factur-X, ZUGFeRD, UBL, CII, XRechnung
- β Flexible integration β use the CLI tool, the REST API, or the TypeScript/JavaScript library
- β Modern ERP-friendly β JSON-based input/output makes it trivial to integrate into any contemporary ERP infrastructure
- β Proven in production β already used by organizations ranging from freelancers to multinational enterprises
Whether you need to automate a few invoices per month or integrate e-invoicing into a large-scale workflow: E-Invoice-EU gives you a reliable foundation.
There are several ways to use the software:
The JavaScript/TypeScript library works both on the commandline and in the browser. The only limitation of the browser version is that it cannot generate PDF versions of invoices from spreadsheet data because this requires invocation of LibreOffice which is not possible in the browser. Instead, you have to provide a PDF version yourself, in case it is needed.
The E-Invoice-EU documentation contains a fully working demo of invoice generation right in your browser.
You can currently create e-invoices in these formats:
CII
: customization idurn:cen.eu:en16931:2017
Factur-X-Minimum
customization idurn:factur-x.eu:1p0:minimum
Factur-X-BasicWL
customization idurn:factur-x.eu:1p0:basicwl
Factur-X-Basic-WL
is an alias forFactur-X-BasicWL
Factur-X-Basic
customization id'urn:cen.eu:en16931:2017#compliant#urn:factur-x.eu:1p0:basic'
Factur-X-EN16931
customization idurn:cen.eu:en16931:2017
Factur-X-Comfort
is an alias forFactur-X-EN16931
Factur-X-Extended
customization idurn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended
Factur-X-XRechung
customization idurn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0
UBL
: customization customization idurn:cen.eu:en16931:2017
XRECHNUNG-CII
: customization idurn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0
XRECHNUNG-UBL
: customization idurn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0
ZUGFeRD-Minimum
is an alias forFactur-X-Minimum
ZUGFeRD-BasicWL
is an alias forFactur-X-BasicWL
ZUGFeRD-Basic-WL
is an alias forFactur-X-BasicWL
ZUGFeRD-Basic
is an alias forFactur-X-Basic
ZUGFeRD-EN16931
is an alias forFactur-X-EN16931
ZUGFeRD-Comfort
is an alias forFactur-X-EN16931
ZUGFeRD-Extended
is an alias forFactur-X-Extended
ZUGFeRD-XRechnung
is an alias forFactur-X-XRechnung
Case does not matter, when you specify a format.
This repository is an attempt to aid businesses, especially in France and Germany but also in other parts of the European Union to create e-invoices conforming with EN16931 with only free and open-source software.
See the E-Invoice-EU online documentation.
The blog post Creating E-Invoices with Free and Open Source Software or the German version Elektronische Rechnungen mit freier und quelloffener Software erzeugen also provides in-depth information using a gentler approach!
You can also use the documentation interactively by asking questions in natural language. See https://gflohr.github.io/e-invoice-eu/en/docs/basics/ai-supported-documentation/ or go directly to https://notebooklm.google.com/notebook/f5783dde-ebe6-4610-bac1-f181fdf45f94.
It is strongly recommended that you validate all incoming and outgoing e-invoices. See Validation for details.
A new and very simple option is offered by the sister project to this one, e-invoice-eu-validator.
The Factur-X resp. ZUGFeRD standard requires PDF/A compliance for the PDF that the invoice is wrapped in. Please search the internet if you do not know what PDF/A means.
This library creates PDFs solely with pdf-lib
and does some pretty complicated transformations on the PDF to achieve PDF/A
compliance. This is not battle tested and may fail.
If you encounter a PDF that does not meet the PDF/A requirements, please open an issue and attach an anonymized version of the PDF. What you can do in the meantime:
- If you have GhostScript installed, convert the PDF to PDF/A with this command:
gs -dVERBOSE -dPDFA=3 -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=OUTPUT_FILE.pdf PDFA_def.ps INPUT_FILE.pdf
- Try to create the PDF again with LibreOffice.
- If the normal settings in LibreOffice do not work, enable PDF/A support (in the General section of the PDF options).
- If you want to automate the process, you can start LibreOffice in headless mode on the commandline:
libreoffice --headless "-env:UserInstallation=file:///tmp/LibreOffice_Conversion_${USER}" --convert-to 'pdf:writer_pdf_Export:{"SelectPdfVersion":{"type":"long","value":"3"}}' SOURCE_FILE.ods
On Un*x systems, libreoffice
should be in your $PATH
. On MacOS, you will
find it under /Applications/LibreOffice.app/Contents/MacOS/soffice
. On
MS Windows, it is probably somewhere like C:\\Program Files\\LibreOffice\\libreoffice.exe
(corrections are welcome).
Please report bugs at https://github.com/gflohr/e-invoice-eu/issues.
Copyright (C) 2024-2025 Guido Flohr [email protected], all rights reserved.
This is free software available under the terms of the WTFPL.
This free software has been written with the greatest possible care, but like all software it may contain errors. Use at your own risk! There is no warranty and no liability.