KoSIT Validator: Validate Your XRechnung E-Invoice

Table of Contents
You have generated an XRechnung e-invoice and are about to submit it. But one structural error, one missing field, and the invoice bounces back, delaying your payment by weeks. The KoSIT Validator is the official open-source tool that lets you validate your XRechnung e-invoice before it ever reaches the recipient.
Quick answer: The KoSIT Validator is the official free, open-source tool for checking whether an XRechnung meets the German standard. It validates XML structure, Schematron rules, and XRechnung business rules in one pass. It needs Java 11 or higher (Java 17 LTS recommended). The current release is validator v1.6.0 with the 2026-01-31 configuration, compatible with XRechnung 3.0.x.
Key Takeaways
- The KoSIT Validator is the official validation tool maintained by Germany's IT Planning Council.
- It checks XSD schema, Schematron rules, and business rules in a single pass.
- Installation requires only Java 11+ and a download from GitHub.
- The most common validation errors are straightforward to fix once you know the error codes.
- For production workflows, API-based validation (like Complyance) eliminates manual CLI work entirely.
What Is the KoSIT Validator?
The KoSIT Validator is a Java-based, open-source validation tool developed by the Koordinierungsstelle für IT-Standards (KoSIT) on behalf of Germany's IT Planning Council. Its primary purpose is to validate XML documents, most notably XRechnung e-invoices, against a defined set of rules.
Good to know: The KoSIT Validator is not limited to XRechnung. It can validate any XML document for which a matching configuration set exists.
The source code is freely available on GitHub and is actively maintained.
What Exactly Does the KoSIT Validator Check?
1. XSD Schema Validation
The tool checks whether your XML file conforms to the underlying XSD schema. Are all mandatory elements present? Do data types match? Is the XML well-formed?
2. Schematron Rules
The validator applies Schematron rules. These check complex cross-field dependencies. Example: "If field X has value A, then field Y must be present."
3. Business Rules
The XRechnung-specific business rules are evaluated. These ensure your invoice is not only technically valid but also content-compliant.
| Validation Layer | What It Checks | Example |
|---|---|---|
| XSD Schema | Document structure, data types, mandatory fields | Missing <cbc:ID> element |
| Schematron | Rule-based cross-field dependencies | Tax category does not match tax rate |
| Business Rules | XRechnung-specific requirements | Leitweg-ID missing or malformed |
Installing the KoSIT Validator, Step by Step
Prerequisites
- Java 11 or higher (Java 17 LTS recommended)
- Command line / terminal access
- Approximately 50 MB of free disk space
Verify your Java version:
java -versionStep 1: Download the Validator
wget https://github.com/itplr-kosit/validator/releases/download/v1.6.0/validator-1.6.0.zip
unzip validator-1.6.0.zipStep 2: Download the Configuration Set
wget https://github.com/itplr-kosit/validator-configuration-xrechnung/releases/download/v2026-01-31/xrechnung-3.0.2-validator-configuration-2026-01-31.zip
unzip xrechnung-3.0.2-validator-configuration-2026-01-31.zip -d xrechnung-config/Step 3: Verify the Directory Structure
project/
├── validator-1.6.0.jar
└── xrechnung-config/
├── scenarios.xml
├── resources/
└── ...Important: The scenarios.xml file is the entry point for the validator.Validating Your XRechnung: CLI Commands
Basic Command
java -jar validator-1.6.0.jar \
-s xrechnung-config/scenarios.xml \
-o output/ \
invoice.xmlParameter breakdown:
| Parameter | Purpose |
|---|---|
| -s | Path to the scenario file (scenarios.xml) |
| -o | Output directory for the validation report |
| invoice.xml | The XRechnung file to validate |
Batch Validation
java -jar validator-1.6.0.jar \
-s xrechnung-config/scenarios.xml \
-o output/ \
invoices/*.xmlValidation with HTML Report
java -jar validator-1.6.0.jar \
-s xrechnung-config/scenarios.xml \
-o output/ \
-h \
invoice.xmlThe -h flag generates an additional HTML report.
Understanding the Validation Report
Result: Valid
<rep:assessment>
<rep:accept>This validation report contains no errors.</rep:accept>
</rep:assessment>Result: Invalid
<rep:assessment>
<rep:reject>
<rep:explanation>
<rep:detail>BR-DE-01: An XRechnung MUST contain a Leitweg-ID.</rep:detail>
</rep:explanation>
</rep:reject>
</rep:assessment>Pro tip: Use the -h parameter to generate an HTML report. It is significantly easier to read.Top 10 Validation Errors, and How to Fix Them
| # | Error Code | Description | Fix |
|---|---|---|---|
| 1 | BR-DE-01 | Leitweg-ID is missing | Populate field BT-10 with a valid Leitweg-ID |
| 2 | BR-DE-02 | Bank account missing for credit transfer | Add BT-84 (IBAN) |
| 3 | BR-CO-10 | Line item totals do not add up | Recalculate net amounts |
| 4 | BR-S-08 | Tax category S without correct tax rate | Set VAT rate to 19% or 7% |
| 5 | BR-CL-10 | Invalid currency code | Use an ISO 4217 code (e.g., EUR) |
| 6 | BR-DE-18 | Leitweg-ID syntax is invalid | Verify the format: 04011000-1234512345-06 |
| 7 | BR-16 | Purchase order reference is missing | Populate BT-13 |
| 8 | BR-DE-15 | Seller email address is missing | Add a valid email to BT-43 |
| 9 | BR-CO-15 | Tax amount deviates from expected value | Check rounding (max. 0.01 EUR tolerance) |
| 10 | BR-DE-21 | Payment terms are missing | Populate BT-20 |
Do: Validate every single invoice before submission.
Don't: Rely on the recipient's system to catch errors.
Online Validation Alternatives
- ZRE / OZG-RE portals: Germany's federal e-invoicing platforms include built-in validation on upload.
- KoSIT online validator: A web-based version for single invoices.
- Third-party tools: Various software vendors offer free online validation.
Limitations of online tools:
- Not suitable for batch validation
- Data privacy concerns
- No integration with automated workflows
API-Based Validation with Complyance
Complyance integrates XRechnung e-invoice validation directly into your existing systems.
Field-Specific Error Messages
Field [BT-10] is required — Buyer Reference (Leitweg-ID) must be present for all B2G invoices.Validation Caught Early, Not at the End
Complyance validates at the point of data entry, not just at submission.
Error Messages with Resolution Guidance
Tax Calculation Mismatch: Field BT-110
Net amount across line items does not match the invoice total.
→ Recalculate line extension amounts and verify rounding.What the Complyance Validation Layer Covers
| Validation Type | KoSIT CLI | Complyance API |
|---|---|---|
| XSD schema | Yes | Yes |
| Schematron rules | Yes | Yes |
| XRechnung business rules | Yes | Yes |
| Field-specific error messages | No | Yes |
| Inline validation on data entry | No | Yes |
| Resolution guidance per error | No | Yes |
| Batch processing | Manual scripting | Yes (built-in) |
| CI/CD pipeline integration | Yes (Java) | Yes (REST API) |
Do's and Don'ts
Do
- Validate every invoice before sending.
- Keep the validator and configuration set up to date.
- Integrate validation into your CI/CD pipeline.
- Use the HTML report for a clearer error analysis.
- Test with the official sample invoices first.
Don't
- Skip validation because your last invoice was error-free.
- Ignore warnings.
- Resubmit a rejected invoice without fixing the underlying error.
- Depend solely on online portals.
Conclusion
The KoSIT Validator is the essential tool for anyone creating or processing XRechnung e-invoices. It is free, open-source, and the official reference implementation for German e-invoice validation.
Related posts
Frequently Asked Questions
Yes. The KoSIT Validator is an open-source project under the Apache 2.0 license.
At minimum, Java 11. Java 17 LTS or newer is recommended.
Yes. The validator is available as a Maven dependency:
It can validate the XML portion of a ZUGFeRD invoice if the appropriate configuration set is loaded. However, it does not validate the embedded PDF component.
BR-DE-01 indicates that the Leitweg-ID (BT-10) is missing.
KoSIT updates in line with new versions of the XRechnung specification. Plan to update your installation at least twice per year.
Yes. You can run the validator as a REST service:
The KoSIT Validator is a pure validation tool. Commercial solutions like Complyance offer automated invoice creation, format conversion, submission, and archiving.





















