E-Rechnung · Formats

How to Validate an XRechnung Before Sending It

Guide · 3 min read

A syntactically correct XRechnung file can still fail validation. Knowing what to check before you send saves the rejection cycle and the delay in getting paid.

Quick answer: XRechnung validation checks that the XML or ZUGFeRD file complies with EN 16931 rules, the German core invoice model (CIUS) and any additional buyer requirements. The Validator of the KoSIT (kosit.org) is the official free tool. The most common errors are missing mandatory fields, wrong VAT category codes and incorrect Leitweg-ID format. This is general information, not tax or legal advice.

What validation checks

An XRechnung validator runs two categories of checks: schema validation (is the XML well-formed and uses the correct structure?) and schematron validation (do the values satisfy the business rules defined in EN 16931 and the German CIUS?). Passing both means the invoice is technically compliant with the standard. It does not guarantee the recipient will accept it if their system adds additional requirements.

The official validator: KoSIT

The Koordinierungsstelle fur IT-Standards (KoSIT) publishes the reference validator used by German public administrations. It is available as a command-line tool and a web interface at its official repository. Upload or paste the XML and the tool lists every failed rule with the relevant field path. This is the same validator public sector recipients use, so passing it gives strong confidence the invoice will not be rejected on technical grounds.

Common validation errors and how to fix them

Validating ZUGFeRD files

ZUGFeRD embeds the XML invoice inside a PDF. Validators for ZUGFeRD check the embedded XML against the same EN 16931 rules. The Mustang Project (mustangproject.org) provides an open-source validator for ZUGFeRD in addition to the KoSIT tool. Both are freely available.

What validation cannot catch

Validation confirms technical compliance, not commercial accuracy. A valid invoice with the wrong amount, the wrong line items or the wrong Leitweg-ID for this specific recipient passes validation but is rejected or disputed by the buyer. Double-check commercial details manually before sending. For background on the mandate and required fields, see e-invoice required fields and the German e-invoicing mandate. E-Rechnung helps you create compliant invoices. This is general information, not tax or legal advice.

Common questions

How do I validate an XRechnung?
Use the KoSIT validator (available at the KoSIT GitHub repository). Upload or paste your XML and it checks compliance against EN 16931 and the German CIUS. It is the same validator used by public sector recipients in Germany. This is general information, not tax or legal advice.
What are the most common XRechnung errors?
Missing party identifiers, incorrect Leitweg-ID format, wrong VAT category codes, missing payment means fields, and incorrectly formatted dates. The KoSIT validator lists each failed rule with the field path so you can locate and fix the issue.
Does a valid XRechnung guarantee payment processing?
Technical validity means the file conforms to the standard. The recipient's system may add further requirements beyond the standard. Always test with the specific buyer or public authority first, especially for new trading relationships. This is general information, not tax or legal advice.
About the app
E-Rechnung - e-invoices on iPhone
About the app →