KoSIT Validator: What It Checks and How to Run It
The KoSIT validator explained: validation steps, scenarios, a Java CLI and HTTP example, the report verdict and which configuration matches XRechnung 3.0.2.
Key takeaways
- The KoSIT validator checks XML invoices against XSD schemas and Schematron rules defined in a configuration, then recommends accepting or rejecting them.
- Current versions are validator 1.6.3 of 20 August 2026 and configuration 2026-08-31 for XRechnung 3.0.2 with CEN rules 1.3.16.
- The scenario, chosen from the root element and the specification identifier (BT-24), decides which rules run.
- Exit code 0 means every file is acceptable; any other positive number is the count of rejected files.
- In daemon mode the validator answers HTTP POST requests with 200 for acceptable and 406 for rejected invoices.
On this page
The KoSIT validator is the open-source validation tool of Germany's Coordination Office for IT Standards (Koordinierungsstelle für IT-Standards, KoSIT). With the XRechnung configuration, it checks an XML invoice against the XSD schema, the EN 16931 rules and the XRechnung rules and recommends accepting or rejecting it. It runs as a Java command-line tool or as an HTTP service.
This guide is for developers, integrators and accounts payable teams who want to reproduce a validation result or run the validator themselves. All facts are as of 29 September 2026: validator 1.6.3 and configuration 2026-08-31.
What is the KoSIT validator?
The KoSIT validator is a configurable Java program that validates XML documents against XSD schemas and Schematron rules and writes a report with an acceptance recommendation. KoSIT describes it on xeinkauf.de (opens in a new tab) as a "configurable XML validation tool" that becomes an XRechnung validator through an XRechnung-specific configuration.
Two parts belong together:
| Part | Contents | Source |
|---|---|---|
| Validator | Java validation engine, Apache 2.0 licence, standalone JAR | itplr-kosit/validator (opens in a new tab) |
| XRechnung configuration | scenarios.xml, XSD for UBL 2.1 and UN/CEFACT CII 16B, EN 16931 and XRechnung Schematron compiled to XSLT, report template | validator-configuration-xrechnung (opens in a new tab) |
Without a configuration the validator checks nothing, because all rules live in the configuration. When someone asks which KoSIT validator version you use, the more useful answer is the configuration date.
How does a validation run work?
- Pick a scenario: the validator compares the root element and the specification identifier (BT-24) with the
matchexpressions inscenarios.xml. - XSD check: the file must conform to the UBL 2.1 or CII schema.
- EN 16931 Schematron: mandatory fields (BR-…), calculations (BR-CO-…), code lists (BR-CL-…).
- XRechnung Schematron: German national rules (BR-DE-…), only in the XRechnung scenarios.
- Report: the report template collects the results. The configuration can change severities here; version 2026-08-31, for example, downgrades BR-CL-23 from "fatal" to "warning".
- Verdict: if the report contains a
rep:acceptelement, the file counts as acceptable.
This is the start of the first scenario in the current configuration:
<match>exists(/invoice:Invoice/cbc:CustomizationID[ . = 'urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0']) </match>
<validateWithXmlSchema>
<resource>
<name>XML Schema for UBL 2.1 Invoice</name>
<location>resources/ubl/2.1/xsd/maindoc/UBL-Invoice-2.1.xsd</location>
</resource>
</validateWithXmlSchema>
Configuration 2026-08-31 contains eleven scenarios:
| Identifier in BT-24 | Scenario | Documents |
|---|---|---|
urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0 | XRechnung | UBL Invoice, UBL CreditNote, CII |
the same identifier plus #conformant#urn:xeinkauf.de:kosit:extension:xrechnung_3.0 | XRechnung Extension | UBL Invoice, CII |
identifier ending in #compliant#urn:xeinkauf.de:kosit:xrechnung:cvd_0.9 | XRechnung CVD | UBL Invoice, UBL CreditNote, CII |
urn:cen.eu:en16931:2017 | EN 16931 without XRechnung rules | UBL Invoice, UBL CreditNote, CII |
| any other identifier | no scenario | recommendation: reject |
The last row explains a common surprise: an invoice with an outdated identifier such as xrechnung_2.3 is rejected before a single business rule runs. Namespaces and BT-24 are covered in XRechnung XML structure.
Where does the validator fit legally?
The BMF letter of 15 October 2025 (BMF: German Federal Ministry of Finance) does not name a specific tool. It refers to a "suitable validation application" that can detect format errors (para. 6a). Under para. 35a, a business exercising the care of a prudent merchant may rely on the technical result of such a validation for format and business rules, and keeping the validation report is recommended as evidence.
Validation does not replace checking the content. A wrong VAT rate breaks no rule but is still a content error. How format, business-rule and content errors relate is explained in our guide to fixing XRechnung validation errors.
Example: run the validator locally
You need Java 11 or later. The commands follow the usage guide of the XRechnung configuration, with folder names adapted.
# Download the validator and the XRechnung configuration
curl -L -o validator-1.6.3-standalone.jar \
https://repo1.maven.org/maven2/org/kosit/validator/1.6.3/validator-1.6.3-standalone.jar
curl -L -o configuration.zip \
https://github.com/itplr-kosit/validator-configuration-xrechnung/releases/download/v2026-08-31/xrechnung-3.0.2-validator-configuration-2026-08-31.zip
unzip configuration.zip -d configuration
# Validate an invoice, write the XML and HTML report to "reports"
mkdir -p reports
java -jar validator-1.6.3-standalone.jar \
-s configuration/scenarios.xml -r configuration \
-o reports -h invoice.xml
echo $?
-s points to scenarios.xml, -r to the folder with the rule files, -o sets the output folder, -h also saves an HTML version of the report, and -p would print the result to the terminal. Afterwards reports contains invoice-report.xml and invoice-report.html.
echo $? shows the exit code:
| Code | Meaning |
|---|---|
| 0 | every validated file is acceptable |
| positive number | this many files were rejected |
| -1 | invalid command line, for example an unknown option |
| -2 | the configuration or the input could not be loaded |
Common pitfalls
- Since version 1.5.1 the file is called
validator-…-standalone.jar. Older scripts and tutorials still callvalidationtool-…. - Since version 1.6.1 the standalone JAR is published separately from the ZIP package; release 1.6.0 shipped only the ZIP.
-rmust point to the folder that contains the configuration'sresourcesfolder. Otherwise the validator cannot find the rule files and exits with -2.- You can pass
-sand-rseveral times, for example to use the XRechnung configuration and the public Peppol BIS Billing configuration in one run. - Instead of a file name, the validator also reads the invoice from standard input, for example
< invoice.xml.
What does the verdict say?
The report template of configuration 2026-08-31 is German and uses five sentences. Translations are ours:
| Verdict in the report | Meaning |
|---|---|
| „Es wird empfohlen das Dokument anzunehmen und weiter zu verarbeiten.“ | accept: no errors |
| „Es wird empfohlen das Dokument anzunehmen und zu verarbeiten, da die vorhandenen Fehler derzeit toleriert werden.“ | accept: errors exist but the configuration tolerates them |
| „Es wird empfohlen das Dokument zurückzuweisen.“ | reject: at least one error |
| „Es wird empfohlen das Dokument zurückzuweisen. Da kein Pruefszenario gegriffen hat.“ | reject: identifier or root element not recognised |
| „Die Validierung konnte nicht vollständig durchgeführt werden. Das Dokument sollte nicht automatisiert angenommen werden.“ | processing failed; new since 2026-08-31 |
Warnings do not change the recommendation. Our list of XRechnung error codes explains individual messages, but the rule text in the report itself is authoritative.
The validator as an HTTP service
The -D option starts a server, by default on localhost, port 8080. Set another address with -H and another port with -P.
java -jar validator-1.6.3-standalone.jar -s configuration/scenarios.xml -r configuration -D
# in a second terminal: POST the invoice and save the report
curl -s -o report.xml -w "%{http_code}\n" \
-H "Content-Type: application/xml" \
--data-binary @invoice.xml http://localhost:8080/invoice.xml
The service returns 200 if the file is acceptable, 406 if it is not, and 422 for a processing error, which usually points to the configuration. It accepts one XML document per request (no multipart) and has no authentication, so put it behind a proxy or restrict access. A health endpoint is available at /server/health.
Which configuration matches which XRechnung version?
| Configuration | For XRechnung | Bundle on xeinkauf.de | Per release notes |
|---|---|---|---|
| 2026-08-31 | 3.0.2 | Summer 2026 Bugfix (31 Aug 2026) | CEN Schematron 1.3.16, validator 1.6.3 |
| 2026-01-31 | 3.0.2 | – | CEN Schematron 1.3.15, validator 1.6.0 |
| 2025-07-10 | 3.0.2 | Winter 2025/26 Bugfix (10 Jul 2025) | CEN Schematron 1.3.14.2, XRechnung Schematron 2.4.0 |
| 2025-03-21 | 3.0.2 | Spring 2025 Bugfix (21 Mar 2025) | CEN Schematron 1.3.13 |
| 2024-10-31 | 3.0.2 | Fall 2024 Bugfix (20 Nov 2024) | XRechnung Schematron 2.2.0 |
| 2023-11-15 | 3.0.1 | – | – |
According to KoSIT, XRechnung 3.0 stays in force until at least 31 July 2027. The XRechnung 4.0 pre-release was published in September 2026, and the final version is expected in spring 2027 together with the technical components. Until then, validate with configuration 2026-08-31. If you still run validator 1.5.x, upgrade to 1.6.3: it fixes a security issue that allowed remote stylesheets to be included in STRICT_LOCAL mode.
KoSIT validator, online check and XML viewer compared
| Criterion | KoSIT validator (local) | docutools.pro XRechnung validator | docutools.pro XML viewer |
|---|---|---|---|
| Scenario selection by BT-24 | yes | yes, same scenarios.xml | no |
| XSD check | yes | yes, same schemas (UBL 2.1, CII D16B) | no |
| EN 16931 Schematron | yes | yes | no |
| XRechnung rules (BR-DE) | only in XRechnung scenarios | only in XRechnung scenarios | no |
Severity changes from scenarios.xml | yes | yes | – |
| UBL CreditNote | yes | no, the upload accepts UBL Invoice and CII only | display only |
| Rule release | configuration of your choice | configuration 2026-08-31 | – |
| Report to keep on file | XML and HTML | no, result shown on the page only | – |
| Where it runs | Java 11+, your machine | file is sent to our server | in your browser |
The online check follows the same steps as the reference tool. It picks the scenario by the identifier in BT-24, checks the XSD schema, and then runs only that scenario's Schematron rules. It also applies the severity changes in scenarios.xml, such as BR-CL-23 as a warning, and uses the same verdict rule: it accepts the file only if no message at level "error" is left. So ZUGFeRD XML in the EN 16931 profile is checked against the EN 16931 rules only. An unknown identifier is rejected before any rule runs, just as the KoSIT validator does it.
We compared the online check with KoSIT validator 1.6.3 and configuration 2026-08-31 on 33 of our own test files and the 86 files of the official XRechnung testsuite. The verdicts, rule codes and levels matched for every file. One difference remains: schema errors come from a different XML library, so their wording differs and they have no cvc-… codes. The schema check itself gives the same result. Only the KoSIT validator produces a report you can keep on file. For a complete ZUGFeRD check, see how to validate a ZUGFeRD PDF.
How to check an XRechnung with docutools.pro
- Open the XRechnung validator and click "Select file", or try the flow with "Load sample invoice". It accepts UBL Invoice and CII files, not PDFs.
- The file is sent to our server and checked the way the KoSIT validator does it: scenario, XSD schema and Schematron rules of configuration 2026-08-31. The free plan allows two uploads a day up to 500 KB.
- You get the verdict "KoSIT-conformant / Valid XRechnung" or "Not KoSIT-conformant", a "Compliance score" and the list of errors and warnings with their rule codes.
- Look up individual codes in the XRechnung validation errors reference, for example BR-DE-15 for the missing buyer reference (BT-10).
- To inspect the file structure, open it in the XML viewer. It shows the tree in your browser, free up to 500 KB, but does not validate.
- If you need a report to keep on file, for example as evidence in the sense of the BMF letter or when onboarding a customer, also run the KoSIT validator as shown above and keep its report.
More guides on validation rules and error messages are on the validation and errors topic page.
Sources
- KoSIT validator on GitHub, with CLI and daemon documentation (opens in a new tab)
- XRechnung validator configuration on GitHub, releases and usage guide (opens in a new tab)
- XRechnung versions and bundles on xeinkauf.de (German) (opens in a new tab)
- BMF letter of 15 October 2025 on e-invoicing (German) (opens in a new tab)
Last reviewed: September 2026
This article is general information, not tax or legal advice.
Tools for this article
- XRechnung ViewerParse, validate & repair German e-invoices with GoBD-compliant audit trail.Open tool →
- KoSIT Error HubSearchable reference for all XRechnung validation error codes with fix guides.Open tool →
- XML ViewerPaste or upload any XML — collapsible tree view, syntax highlighting, XPath queries.Open tool →
Frequently asked questions
Where can I download the KoSIT validator?
The validator is published as a standalone JAR in the GitHub releases of itplr-kosit/validator and, since version 1.6.1, on Maven Central. The XRechnung rules are a separate ZIP in the validator-configuration-xrechnung repository. You need both, plus Java 11 or later. The validator is licensed under Apache 2.0, free to use and needs no registration.
Does the KoSIT validator have an API?
Yes, two. Started with the -D option, it runs as an HTTP service on localhost port 8080 that accepts one XML document per POST request and returns the XML report, with status 200 for acceptable and 406 for rejected documents. Java applications can also embed the validator as a library and call it directly. The HTTP service has no authentication, so secure access yourself.
What are KoSIT validator scenarios?
A scenario is a block in the configuration file scenarios.xml that says which documents it applies to and which XSD schema, Schematron rules and report template to use. The validator picks the scenario whose match expression fits the root element and the specification identifier (BT-24). The XRechnung configuration 2026-08-31 contains eleven scenarios. If none matches, the validator recommends rejecting the file.
Can the KoSIT validator check ZUGFeRD invoices?
Only the XML part, not the PDF or its PDF/A-3 conformance. With the XRechnung configuration, ZUGFeRD XML in the EN 16931 profile is checked against the EN 16931 rules, and the XRECHNUNG profile additionally against the XRechnung rules. The configuration has no scenario for the other ZUGFeRD profiles, so the validator recommends rejecting them because no scenario matched.