Skip to content
Guide · E-invoicing

Checking an XRechnung: how the KoSIT validator works

An XRechnung (the German standard for electronic invoices) is checked with the KoSIT validator, the official and freely available checking program. It first checks the structure of the file, then the rules of EN 16931 and XRechnung, and writes a report saying “accepted” or “rejected”. It runs on your own computer or as a small web server in your own network. What it does not check: whether the invoice is correct for tax purposes.

Written by Marwan Saleh (Development). As of 21 November 2026. All commands and results run by us. Technical explanation, not tax advice.

What the validator checks, step by step

Validation steps in the report for our sample invoice (XRechnung 3.0, UBL)
StepChecksExample of an error
1. XML schema (XSD)Structure, order, data typesDate as 15.01.2027 instead of 2027-01-15
2. EN 16931 rules (Schematron)European mandatory details and calculation rulesBR-CO-16: amount due does not match
3. XRechnung rules (Schematron)Additional German requirementsBR-DE-15: buyer reference missing

At the end comes the verdict: accepted or rejected. Errors lead to rejection, warnings do not. The report also contains a SHA-256 checksum of the checked file, so it is clear which file was checked.

Running the validator on your own computer

  1. 1Install Java (we used Java 21).
  2. 2Download the validator from the KoSIT page on GitHub, together with the matching configuration for XRechnung.
  3. 3Check from the command line or start the validator as a web server.
# Check one file, report as HTML
java -jar validator-1.6.3-standalone.jar \
  -s conf/scenarios.xml -r conf -h rechnung.xml

# As a web server (reachable only in your own network)
java -jar validator-1.6.3-standalone.jar \
  -s conf/scenarios.xml -r conf -D -H 127.0.0.1 -P 8099

curl -X POST -H "Content-Type: application/xml" \
  --data-binary @rechnung.xml http://127.0.0.1:8099/

Our result

Correct sample invoice: accepted, via the web server with HTTP 200. Modified file: rejected, HTTP 406. The state of the server is available under /server/health. This way every invoice can be checked automatically before it is sent.

Where the validator stops

  • It does not check tax content: it does not know whether the tax rate is right or an exemption applies.
  • For the tax per rate it lets differences below €1.00 pass. Measured: €0.99 accepted, €1.00 rejected. Details on BR-CO-17
  • It does not check the PDF wrapper of a ZUGFeRD invoice, only the XML inside it.
  • It does not know whether the recipient can process the file in their system.

Understanding errors in the report

We reproduced 26 typical errors on our sample invoice, with the exact message, cause and solution. Plus all German BR-DE rules in full: Understanding and fixing XRechnung errors.

If the errors keep coming from your shop or your software, gotakt can help: E-invoicing from shop and software, feasibility check €290 net.

Frequently asked questions

What is the KoSIT validator?

The checking program of the KoSIT (Koordinierungsstelle für IT-Standards, the German coordination office for IT standards), which maintains the XRechnung standard. It is freely available, runs on Java and checks a file against the schema and the rules of EN 16931 and XRechnung.

Can I check an XRechnung online and free of charge?

Yes, for example with our free XRechnung checker: it uses the KoSIT validator, runs in Frankfurt am Main and does not store the file. With any checking service: do not upload real customer invoices if you do not know what happens to the data. The KoSIT validator also runs offline on your own computer.

In what order does the validator check?

First the XML schema, that is the structure of the file. Then the business rules of EN 16931 and finally the German XRechnung rules. This is also how it appears in every validation report.

What is the difference between an error and a warning?

An error leads to rejection. A warning does not: our test invoice with a wrong IBAN check digit was accepted, but with the warning BR-DE-19.

Does “accepted” mean my invoice is correct for tax purposes?

No. The validator checks structure and rules, not whether the tax rate or the service is right. For the tax per rate it even lets differences below €1.00 pass; we measured this.

What are XSD and Schematron?

XSD describes which elements may appear in which order. Schematron describes business rules, for example that the totals must add up. The validator uses both.

Can the validator also check ZUGFeRD?

The XRechnung configuration also contains validation scenarios for the CII syntax in which ZUGFeRD data is written. The XML must first be extracted from the PDF, though. It does not check the PDF itself, for example whether it is PDF/A-3; there are separate tools for that, such as Mustang.

Why is my file rejected without an error code?

Usually the validator found no validation scenario because the identifier in the file does not match. We reproduced and explained this.

Sources

As of 21 November 2026. Technical explanation, not tax advice.