Check an invoice in your browser

the rejection, before anyone rejects it.

Choose your invoice’s XML file or try the sample below. XML is the data file used by invoicing software. No account needed.

Start with one missing field

This sample German e-invoice is missing the buyer’s reference, which helps the buyer route it to the right person. For a German public body that reference is its Leitweg-ID, the routing code it gives its suppliers; a business customer can give you any order or customer reference. The field is called buyerReference. Validate it, add the field, then generate the XML.

The finding below uses the standard’s own names. Every field in a European e-invoice (EN 16931) has a number, and the buyer reference is BT-10. XRechnung is Germany’s version of that standard, and BR-DE-15 is the name of its rule that checks the field.

The buttons need JavaScript: the check runs inside your browser. Everything below is the result the build got when it ran this exact invoice.
Install the library

Choose the invoice format your buyer requires. This also selects the rules used to check the sample.

View or edit the complete invoice JSON

valid: false — 1 error.

  • BR-DE-15 BT-10

    XRechnung requires a buyer reference (BT-10). For German public-sector buyers this is the Leitweg-ID; business buyers may supply any reference, but the field must be present.

    Fix: Ask your client for their Leitweg-ID (public sector) or an order/customer reference, and set buyerReference.

valid: true here means the document data passed every rule Attestwire implements. It is not a promise that the receiver will accept the document. Read the exact limits

Check a document you already have

Paste your invoice XML below or choose a file. The checker reads UBL and CII, the two XML file formats a European e-invoice (EN 16931) can be written in. It reports the failing rule, the field and what to change. A Factur-X or ZUGFeRD PDF works as it is: choose or drop the PDF, and the invoice XML inside it is taken out and checked in this tab.

Your file is processed locally in your browser. It is not uploaded. No request carrying your document leaves this page, and no analytics event records anything about it. The page’s analytics records only that the button was pressed.

XML files up to about 8 MB. A Factur-X or ZUGFeRD PDF can be chosen or dropped as it is; paste only XML into the box.

This checker needs JavaScript. Without it, nothing on this page can read your file.
Install the library

This check reads the invoice’s contents. It does not check the XML file’s structure, and a pass here does not mean the receiver will accept the invoice. Read the exact limits

Use the same check in your system

Run this in your code

The MIT package has zero runtime dependencies and makes no network request.

Install
npm install @attestwire/en16931
Then, in full
import { validateInput, minimalXRechnung } from '@attestwire/en16931';

const result = validateInput(minimalXRechnung);

console.log(result.valid, result.errors.length); // true 0

Prefer HTTP? Create a free API key. For agent workflows, connect over MCP.

Put this check in production

Choose local processing or the hosted API.

Hosted API — any language. Send the invoice over HTTP. The free plan includes 100 documents a month with no card. Create a free API key

Local library — TypeScript, no network. Run the same rules in your own process with no key to manage.

Parse and validate your own XML
import { readFile } from 'node:fs/promises';
import { validate } from '@attestwire/en16931';

// validate() takes the file as it is: UBL or CII XML,
// or a Factur-X / ZUGFeRD PDF with the XML inside.
const result = validate(await readFile('invoice.xml'));

console.log(result.valid, result.errors.map((e) => e.rule)); // true []

Working through an agent instead? MCP exposes the same checks, six tools of which need no key.