Skip to main content

E-Invoice Validator (XRechnung and ZUGFeRD)

Validate German e-invoices locally in your browser: two-layer XSD and Schematron checks for XRechnung XML and ZUGFeRD PDF, per the official KoSIT configuration. No upload.

Runs on your device — nothing is uploaded

Under Germany's Growth Opportunities Act (Wachstumschancengesetz), structured electronic invoices (E-Rechnung) became mandatory for all B2B transactions between German domestic businesses: since 1 January 2025 every business must be able to receive e-invoices; since 1 January 2027 businesses whose turnover in the previous calendar year exceeded €800,000 must issue structured e-invoices; and from 1 January 2028 the issuance obligation extends to all businesses. Within this framework, traditional paper invoices, scanned images and ordinary PDFs without embedded structured data count only as transitional "other invoices" (Sonstige Rechnung) and will gradually leave the commercial settlement stage.

An invoice is a business's most sensitive financial asset: it carries the counterparty's name, bank account, purchase list, unit prices and VAT. The vast majority of online validation services ask you to upload the invoice file to a remote cloud server — with attendant risks of data retention, compliance audits and leaks. This tool is built on a pure-frontend, zero-knowledge architecture (WebAssembly and SaxonJS2) that loads the officially published XSD schemas and Schematron rule sets entirely into the browser sandbox. Your invoice files and financial data never leave your device — genuine zero-upload validation with no leakage.

Drop in the invoice file

Drag the invoice XML file or a ZUGFeRD/Factur-X PDF invoice with embedded structured data straight into the workspace, or load it via the file picker. The tool supports invoice files up to 50MB, reads everything in local memory, and makes no background network requests.

Extract the embedded XML and identify the standard

If the input is a PDF document, the tool uses an in-memory PDF parser to unpack its document catalog and EmbeddedFiles attachment name tree, automatically extracting factur-x.xml, zugferd-invoice.xml or xrechnung.xml by specification priority. It then parses the XML root node and the standard identifier (GuidelineSpecifiedDocumentContextParameter or CustomizationID), automatically determining whether the document is XRechnung 3.0, a ZUGFeRD/Factur-X profile, Peppol BIS Billing 3.0 or plain CEN EN 16931. An unrecognised custom specification is reported honestly with its raw identifier — never force-fitted to a rule set.

Run the two-layer strict validation in sequence

The tool executes the two stages in the officially recommended pipeline: first the structural validation layer (XSD), where a WebAssembly-compiled libxml2 engine checks XML syntax, namespaces and the element structure; then the business-rule layer (Schematron), where a SaxonJS2 engine runs the pan-European CEN EN 16931 rules and the German national rules (BR-DE, BR-DEX, BR-TMP transitional rules and the Leitweg-ID routing identifier) together.

Read the diagnosis and export the report

When validation finishes, the page shows the three-state verdict — Pass, Fail or Not Run — lists a summary of the core fields using EN 16931 business terms (BT), and expands every captured violation grouped by official rule code, severity (fatal / error / warning / information) and the exact XPath location. One click copies the structured text report to the clipboard, for internal archiving or feedback to the issuing party.

The two-layer mechanism: XSD structure and Schematron business rules

A compliant E-Rechnung must withstand two examinations at once: grammatical structure and business logic. Many open-source scripts or naive parsers merely check whether the XML parses, or whether a few fields are present — which is exactly how invoices get bounced when submitted to a government central invoice gateway (such as the federal ZRE/OZG-RE platforms) or a large enterprise ERP system. This tool faithfully reproduces the two-layer pipeline of the official validator from Germany's federal coordination body for IT (KoSIT):

Validation layer Engine Scope Typical checks Consequence of failure
Layer 1: structural validation (XSD) libxml2 (Wasm) The XML document's underlying syntax and schema constraints Tag closure, namespace declarations, element order, cardinality of required child nodes, field data types (numbers, date formats) If the structure violates the schema, the document is invalid XML and business rules cannot run reliably
Layer 2: business rules (Schematron) SaxonJS2 (SEF) Accounting, tax and business-logic constraints at international and national level Amount balance (line net totals summing to the total net amount, net plus tax equalling the gross), VAT category code validity, buyer reference (BT-13 Leitweg-ID), bank IBAN format Produces violations with specific rule IDs (e.g. BR-CO-10, BR-DE-1) that can make the invoice unbookable or get it rejected by the gateway

The official artefact system and sequential discipline

For Schematron validation, this tool relies on the official standard artefacts distributed with the KoSIT validator configuration bundle (2026-08-31), strictly following the sequential two-layer discipline:

  1. CEN EN 16931 pan-European rule layer (1.3.16): for UN/CEFACT CII or OASIS UBL syntax, checks the base constraints of the EU's unified core invoice model (BR-01 through BR-65, the BR-CO arithmetic rules, BR-S/BR-E/BR-AE VAT rules and others).
  2. XRechnung German extension rule layer (Schematron 2.6.0 / XRechnung 3.0.2): on top of the European common standard, adds the German-specific national business constraints (CIUS). This includes the mandatory rules for public procurement (e.g. BR-DE-1 requiring the buyer reference Leitweg-ID, BR-DE-2 requiring the seller's electronic contact to include an email address, BR-DE-13 requiring an IBAN for domestic payments, and others).

Why sequence matters: the XRechnung Schematron rule set contains only the Germany-specific BR-DE, BR-DEX and BR-TMP rules — it does not include the European Standard's own underlying arithmetic and business assertions. Running only the XRechnung layer, an invoice with a serious VAT calculation error would still be judged "compliant"; only by running the CEN layer and the XRechnung layer in sequence and merging the results does the verdict match the official audit exactly.

Supported invoice formats and the detection matrix

The tool detects the standard fully automatically by parsing the invoice root node and the specification declaration URN, adapting to the most precise official validation artefact:

flowchart TD
    Input["User input file (.xml / .pdf)"] --> IsPDF{"Is it a PDF file?"}
    IsPDF -- Yes --> ParsePDF["Unpack the PDF name tree (EmbeddedFiles)"]
    ParsePDF --> ExtractXML["Extract factur-x.xml / zugferd-invoice.xml"]
    IsPDF -- No --> ReadXML["Read the XML text stream"]
    ExtractXML --> Detect["Detect document syntax and identifier"]
    ReadXML --> Detect
    Detect --> CheckSyntax{"Determine underlying syntax"}
    CheckSyntax -- "CrossIndustryInvoice" --> CII["UN/CEFACT CII syntax"]
    CheckSyntax -- "Invoice / CreditNote" --> UBL["OASIS UBL 2.1 syntax"]
    CII --> CheckFlavor{"Parse GuidelineID URN"}
    UBL --> CheckCustom{"Parse CustomizationID URN"}
    CheckFlavor -- "xrechnung" --> RunXR_CII["XRechnung 3.0 (CII D16B XSD + CEN + BR-DE)"]
    CheckFlavor -- "factur-x / zugferd" --> RunFX["ZUGFeRD / Factur-X (CEN rule set)"]
    CheckFlavor -- "en16931" --> RunEN_CII["CEN EN 16931 pure CII (D16B XSD + CEN)"]
    CheckCustom -- "xrechnung" --> RunXR_UBL["XRechnung 3.0 (UBL 2.1 XSD + CEN + BR-DE)"]
    CheckCustom -- "peppol" --> RunPeppol["Peppol BIS Billing 3.0 (UBL 2.1 XSD + CEN)"]
    CheckCustom -- "en16931" --> RunEN_UBL["CEN EN 16931 pure UBL (UBL 2.1 XSD + CEN)"]

Format and profile comparison

Format Carrier Underlying syntax Position and typical use Structure schema (XSD) Business rule set (Schematron)
XRechnung 3.0 Pure XML UN/CEFACT CII (16B) or UBL 2.1 The statutory standard of choice for German public procurement (B2G); requires a Leitweg-ID; dedicated to central invoice portals CrossIndustryInvoice 100pD16B / UBL-Invoice-2.1 CEN EN 16931 + XRechnung 3.0.2 (BR-DE)
ZUGFeRD 2.x / Factur-X Hybrid PDF (PDF/A-3 + XML) UN/CEFACT CII The German-French joint hybrid invoice standard; serves both human reading (the PDF visual layer) and machine booking; the mainstream B2B choice D22B (ZUGFeRD 2.x) / D16B CEN EN 16931 rule set (EN 16931 profile)
Peppol BIS Billing 3.0 Pure XML OASIS UBL 2.1 The pan-European network for cross-border public procurement and business trade; flows automatically through Peppol transport gateways UBL-Invoice-2.1 / UBL-CreditNote-2.1 CEN EN 16931 core business rules
CEN EN 16931 core model Pure XML CII or UBL 2.1 The baseline standard of EU Directive 2014/55/EU, defining the common invoice semantic model and data items Official XSD of the corresponding syntax Official CEN validation artefact (1.3.16)

On structural validation of ZUGFeRD 2.x against CII D22B: ZUGFeRD 2.1/2.2/2.3 and later use the UN CEFACT CII D22B dictionary, while the earlier XRechnung and CEN base validation bundles ship mainly the D16B schemas. When a D22B ZUGFeRD invoice arrives, the tool explicitly marks structural validation as skipped (not_run) and runs the CEN business-rule validation in full. This transparent split avoids false structural syntax errors from applying the older D16B schema.

The three-state verdict design: Pass, Fail and Not Run

In serious fiscal compliance software, an ambiguous "failed" verdict can badly mislead accounting staff. An invoice whose validation bundle failed to download because of a local network hiccup must never be marked "non-compliant"; a plain scanned PDF must never receive a fake diagnosis like "VAT check digits violated". This tool follows an industrial state-machine design with three mutually exclusive states:

  1. Pass:
    • The file passed the layer-1 XSD structural validation (or the selected profile explicitly exempts XSD);
    • In the layer-2 Schematron rules, no fatal or error-level assertion failures were caught;
    • If warning or information-level findings exist (such as deprecated-code advisories or transitional hints), the invoice is still judged compliant, and the findings are shown separately for the business to verify.
  2. Fail:
    • The file violates XSD grammar at the structural layer (missing required tags, misplaced nodes);
    • Or it triggers one or more hard business-rule violations at the business layer (arithmetic totals that don't add up, a missing seller VAT identifier, a missing Leitweg-ID in a B2G scenario, and so on);
    • The report lists each violation's specific rule code (e.g. BR-DE-01, BR-CO-15) in order of appearance, with the original specification text and the exact XPath location in the XML document.
  3. Not Run:
    • The rule set could not execute due to an environment, input or technical obstruction — never a judgement that the invoice itself failed compliance;
    • Typical cases: the PDF has an open-permissions password (an encrypted PDF cannot be unpacked on-device), the PDF is a legacy flat scan with no embedded XML, the XML is corrupted and unparsable, the file declares an unknown custom Guideline URN, and so on. The tool names the obstruction and points to a troubleshooting path.

Key invoice fields at a glance (the BT term system)

The European standard EN 16931 defines a standardised system of business terms (BT) that establishes a unified data model mapping across every syntax. After validation, the tool automatically parses out the key financial fields and presents them bilingually, so you can check an invoice's core commercial data without reading the underlying XML:

Term code Field name Business meaning and legal points
BT-1 Invoice Number The invoice's unique business identifier, must be unique within the issuer's system
BT-2 Issue Date The legal date of issuance, usually formatted YYYY-MM-DD
BT-3 Type Code UNTDID 1001 standard code, e.g. 380 (commercial invoice), 381 (credit note)
BT-4 Due Payable Amount The total the recipient must finally transfer, after prepayments and discounts
BT-13 Buyer Reference / Leitweg-ID The routing identifier mandatory for German public procurement (B2G), used by the central invoice system to address the recipient body
BT-31 / BT-32 Seller legal name & VAT number The issuing company's legal registered name and EU/national VAT identifier (e.g. DE123456789)
BT-44 Buyer legal name The full legal registered name of the purchasing party receiving the goods or services
BT-106 Line Extension Amount The arithmetic sum of all invoice line net amounts (unit price × quantity)
BT-109 Tax Exclusive Amount The total net basis for VAT calculation (after document-level discounts and charges)
BT-110 Tax Total Amount The total VAT amount contained in the invoice, in the invoice currency
BT-112 Rounding Amount A positive or negative minor adjustment to meet a specific settlement currency's requirements
BT-115 Grand Total / Payable Amount The amount payable after adding the VAT total to the net amount
BT-84 Payment IBAN The seller's designated receiving bank account, supporting SEPA credit transfers

Deep compliance validation

Two-layer checks of XML syntax and accounting rules strictly against the officially published artefacts. Beyond the invoice's arithmetic self-consistency, it deeply verifies the Germany-specific BR-DE statutory fields (such as the Leitweg-ID check digits and the legal VAT-exemption reason codes).

Honest compliance boundaries

The tool focuses on structural and business-rule compliance; it does not replace a tax audit: it does not verify whether the invoiced transaction actually took place or the contractual relationship exists; it does not run veraPDF-grade PDF/A-3 long-term-archival checks on the PDF's visual layer; it does not perform online cryptographic verification of qualified electronic signature (QES) certificate chains.

Zero-knowledge, on-device privacy

A serverless architecture: the entire parsing and validation logic runs 100% in local browser memory. No matter how many line items, amounts or customer records an invoice contains, nothing is uploaded — no commercial intelligence leaks through a third-party relay.

Official artefact versioning, in the open

The validation rule set versions are public and strictly aligned with the German federal KoSIT official baseline (current bundle: the 2026-08-31 release, embedding CEN 1.3.16 and XRechnung 3.0.2). The diagnostic report honestly carries the bundle fingerprint, directly usable as technical audit evidence.

Frequently asked questions

Why does an ordinary PDF invoice no longer count as an e-invoice after 2025?

Under German tax law and the EU EN 16931 framework, "electronic invoice" (E-Rechnung) has a strict legal definition: an invoice issued, transmitted and received in a machine-readable structured format that automated processing can handle. A traditional PDF invoice (a Word export, a scan) travels electronically, but at its core it is an unstructured layout file — a computerised accounting system cannot accurately extract the line items without human intervention or OCR guesswork. That is why, since 1 January 2025, such plain PDFs have been legally downgraded to "other invoices" (Sonstige Rechnung), and once the transition ends they will no longer be accepted as valid B2B invoice evidence.

What is the switchover timeline for German businesses, and what exemptions exist for small ones?

The timeline splits into a "receiving obligation" and an "issuing obligation":

  1. Receiving obligation: since 1 January 2025, all German domestic businesses — of any size, including the self-employed and small traders (Kleinunternehmer) — must be able to receive and process compliant structured e-invoices. A dedicated finance inbox or an activated portal already satisfies the basic receiving requirement.
  2. Issuing obligation (transition period):
    • Until the end of 2026: all businesses may continue issuing paper invoices, or plain PDFs with the buyer's consent;
    • Until the end of 2027: businesses with previous-year turnover not exceeding €800,000 may keep issuing paper or consented plain PDFs; those above €800,000 must issue structured E-Rechnung;
    • From 1 January 2028: every business must issue structured e-invoices for domestic B2B transactions. Businesses applying the small-business VAT exemption under § 19 UStG (Kleinunternehmer) are exempt from the issuing obligation, but remain bound by the mandatory receiving obligation.
How do B2B and B2G (public procurement) differ in format choice?

In B2G transactions (with public bodies and government agencies) the format requirements are strict: pure-XML XRechnung is typically mandatory, and the invoice must carry the recipient body's Leitweg-ID in the buyer reference field (BT-13) so the government invoice gateway (ZRE/OZG-RE) can route it automatically; a missing Leitweg-ID gets rejected by the gateway outright. In B2B trade, businesses have more freedom: either pure-XML XRechnung, or the ZUGFeRD / Factur-X hybrid invoice embedding structured XML inside the PDF visual layer. For ordinary commercial customers ZUGFeRD's acceptance is usually higher — human accountants can double-click and read the PDF page, while finance software silently grabs the XML attachment.

My report says "ZUGFeRD invoice skipped XSD check" — does the invoice still pass?

Yes, it passes. The ZUGFeRD 2.x series is based on the UN/CEFACT CII D22B dictionary, while the earlier official common validation bundles target mainly the D16B schemas. Force-validating a D22B document against a D16B XSD would raise false errors from the namespace version difference. So the tool marks the XSD as not_run in this case, states the reason, and fully runs the CEN EN 16931 business-rule validation (Schematron) that applies to the invoice. As long as the layer-2 business rules judge Pass with no blocking errors, the invoice is compliant at the data and financial level.

Does a Pass verdict mean the invoice is fully exempt in a tax audit?

No. This validator confirms the invoice file's legitimacy at the technical and standard-rule level — conformance to EN 16931, XRechnung 3.0 or the ZUGFeRD specification, arithmetically self-consistent, required fields present. It cannot verify, and cannot replace human verification of: whether the invoiced business actually took place, whether the purchase prices are truthful, whether the VAT rate or exemption reason applies correctly under tax law, or whether the counterparty business currently still exists. Commercial truth and bookkeeping compliance always remain the taxpayer's and their tax adviser's (Steuerberater) responsibility.

What if I need to create standards-compliant e-invoices in bulk or offline?

If you need to generate e-invoices that pass the checks above, use our E-Rechnung generator. It lets you enter the transaction in a local form, automatically computes the tax amounts and produces a compliant XRechnung 3.0 XML or an embedded ZUGFeRD PDF — and once generated, self-checks it locally with the same rule set as this tool. All validation and generation rules are cached offline by the browser after the first visit, so later runs stay safe even without a network connection.

Guides

Longer write-ups on the things these tools deal with: file formats, size limits, and the algorithms behind them.