einvoice / Comparison

Why not KoSIT or Mustangproject?

Fair question — it is the first one every German ERP developer should ask. The official KoSIT validator and Mustangproject are both free, mature, and in wide production use; for several jobs they are the better choice, and this page says exactly which jobs those are. einvoice earns its place on one axis only: it is a zero-dependency, pure-Python, CI-native conformance gate — no Java, no Saxon, no Schematron toolchain — whose correctness is differentially proven against the official KoSIT artifact.

What each tool is

KoSIT validator — the official validation tool from the Koordinierungsstelle für IT-Standards (KoSIT), the body that publishes the XRechnung standard itself. It is the reference implementation: a Java tool that runs the official XSD schema validation and the official Schematron business rules via an XSLT pipeline. Free and open source. When the KoSIT validator and anything else disagree, the KoSIT validator is right by definition.

Mustangproject — a free, open-source Java library and CLI centred on ZUGFeRD / Factur-X: hybrid e-invoices that embed the structured XML inside a PDF/A-3. Its standout capability is that it writes invoices, not just validates them — it can create a ZUGFeRD PDF from your data or embed XML into an existing PDF, and it validates what it reads. If you need to produce hybrid PDF invoices from Java, it is the obvious tool.

einvoice (this project) — a validation-only conformance gate in pure Python 3 standard library (zero runtime dependencies, fully offline). It asserts 297 EN 16931 / XRechnung business rules, each differentially proven at 0 divergences against the official KoSIT XRechnung Schematron artifact — see the honest dependency note below. It emits json, junit, sarif, gitlab, github, azure, html, badge, text reports, ships a uses:-pinnable GitHub Action and a pre-commit hook, and documents every rule on a per-rule reference page in English and German.

Our correctness claim derives from KoSIT’s artifact

Being explicit about the relationship: einvoice is not an independent reading of the EN 16931 specification. Its correctness claim derives from the official KoSIT/CEN Schematron artifacts — a differential harness runs this engine and the official Schematron side by side over generated and official test invoices and requires 0 divergences on every proven rule, in both the UBL and CII syntax bindings. The official artifact is the ground truth; this engine is a re-implementation proven equivalent against it, rule by rule. Without KoSIT’s published artifact that proof would be impossible, which is one more reason this page has no interest in talking the official toolchain down.

Side by side

einvoiceKoSIT validatorMustangproject
RuntimePure Python 3 standard library — zero dependencies, no toolchainJava (JRE) + Saxon XSLT pipelineJava (JRE), library or CLI
Official statusIndependent; proven against the official artifactThe official reference implementationCommunity open source, widely used
PriceFree (Apache-2.0); optional $29 / $290 support licenseFree, open sourceFree, open source
XSD schema validationNo — business rules onlyYesYes (ZUGFeRD / Factur-X focus)
EN 16931 / XRechnung business rules297 rules, differential-proven at 0 divergencesYes — runs the official Schematron itselfYes, for the profiles it targets
Input syntaxes acceptedBoth XRechnung syntaxes, directly: UBL 2.1 Invoice / CreditNote and UN/CEFACT CII rsm:CrossIndustryInvoice — dispatched on the root element, no syntax flag, no wrapper needed for a raw .xml. Also a Factur-X / ZUGFeRD PDF/A-3 container: einvoice validate invoice.pdf extracts the embedded XML and grades it with the same rules and the same exit codesThe same two syntaxes — the official Schematron artifact carries both a UBL and a CII binding (the two legs our differential proof runs against, above)The same two syntaxes, and the ZUGFeRD / Factur-X hybrid PDFs that are its documented focus — of the three it is the only one that also writes them, two rows below
Peppol BIS Billing 3.0No — only the 21 PEPPOL-EN16931-R* rules KoSIT vendors inside the XRechnung artifactValidates whatever scenario/artifact you configure; the official ecosystem covers more hereBroader e-invoicing ecosystem support
Writes / creates invoicesNo — validation onlyNo — validation onlyYes — creates ZUGFeRD PDFs and embeds XML into PDF/A-3
CI reportsjson, junit, sarif, gitlab, github, azure, html, badge, textXML / HTML validation reportJava API and CLI output
Regression gate against a stored reportYeseinvoice validate --baseline <prev-report.json> --profile <p> <invoice.xml> fails only on findings that are new since a captured report, so an archive that already fails can be gated today. Two limits below, both load-bearingNot verified. It produces a verdict per run; we have not checked whether it ships a diff-against-a-stored-report mode, and this page does not guess one either wayNot verified — same, for the same reason
Report languageEnglish by default. --lang de swaps the human-facing text: the terminal summary and the text report carry the German message, and --lang de --format html produces a German document — <html lang="de">, German headings, and on every finding a German rule title plus a German Behebung fix hint, which the catalog carries for all 297 rules. The official KoSIT German assert text is quoted verbatim on the 50 rules that publish one (de_source == "kosit"); the other 247 keep their authoritative English assert sentence rather than a machine translation, marked [en] in the HTML report with a note explaining the marker. The seven machine report bodies are byte-identical with and without the flag. This is parity with KoSIT, not an advantage over it.German, natively — it is the German standards body’s own tool, and the official German assert text quoted in our 50-rule column is theirs, taken from the artifact they publishNot verified. We have not checked which report languages Mustangproject offers, so this page states nothing about it

A caution about the table: the einvoice column is machine-derived from this engine’s own registries; the other two columns state only what those tools are publicly known for, and where we were not confident of a detail we described the ecosystem rather than guessing a feature. Check their documentation for anything load-bearing.

Where einvoice earns its keep

Two other kinds of alternative you will find

The rest of this page compares two Java projects, because those are the things an EN 16931 engine is usually measured against. A search in German or English mostly returns two different categories, and you should know where they fit before you decide anything:

When to prefer them

Honestly, in several situations you should not use einvoice at all, or should use it only alongside the official tool:

The honest summary: use the official KoSIT validator as your authority, Mustangproject when Java or PDF-writing is in play, and einvoice when you want the same business-rule verdict as a zero-dependency Python gate inside every CI run and pre-commit — cheap enough to run on every push, proven against the artifact the official tool runs.

Want to try that verdict before wiring anything into CI? The in-browser validator runs the same 297-rule engine in your browser via WebAssembly (Pyodide) — drop an XRechnung XML or a ZUGFeRD/Factur-X PDF and read the findings; the invoice never leaves your machine.