How to Validate a ZUGFeRD PDF: PDF/A-3, XML and Profile Checks
Validate ZUGFeRD PDF files in six steps: PDF/A-3 with veraPDF, the embedded XML, profile, Schematron business rules and VAT content, all with free tools.
Key takeaways
- A complete ZUGFeRD check covers six layers: PDF/A-3, embedding and XMP metadata, XML schema, Schematron business rules, PDF-to-XML consistency and the VAT-mandatory details of § 14 (4) UStG.
- veraPDF checks PDF/A conformance only; the Mustang validator checks PDF/A (via veraPDF), XML schema and Schematron in a single run.
- The XRECHNUNG profile must also pass the German KoSIT rules, such as BR-DE-15 for the buyer reference in BT-10.
- Under the German Finance Ministry letter of 15 October 2025, a file with format errors is not an e-invoice, while business-rule errors on non-VAT fields such as BT-10 are irrelevant for VAT.
- The Finance Ministry recommends keeping the validation report as evidence, ideally stored with the invoice for the full eight-year retention period.
On this page
To validate a ZUGFeRD PDF you check two things: the PDF must conform to PDF/A-3, and the embedded XML must match the CII schema and the business rules of its profile. veraPDF handles the PDF/A check, and the Mustang validator covers both parts in one run. For the XRECHNUNG profile, the KoSIT rules apply as well.
Last reviewed: September 2026. This article is general information, not tax advice.
Why isn't looking at the PDF enough?
According to the German Finance Ministry (BMF) letter of 15 October 2025 (opens in a new tab), the structured part of a hybrid invoice is the leading part. If PDF and XML differ, the XML prevails, and input VAT can only be deducted on the basis of the XML. A PDF can look perfect while the XML is missing, declares the wrong profile or contains calculation errors. Under paragraph 6a of the letter, a file with format errors is not an e-invoice but an "other invoice" (sonstige Rechnung).
That is why validation works through the file layer by layer. For background on the format and its profiles, see What is ZUGFeRD?.
What are the layers of a ZUGFeRD check?
| Layer | What is checked | Tool | Typical error |
|---|---|---|---|
| 1. PDF/A-3 | ISO 19005-3: fonts, colour profile, metadata | veraPDF, Mustang | Font not embedded |
| 2. Embedding | File name, AFRelationship, XMP profile declaration | Mustang, ZUGFeRD extractor | Wrong file name |
| 3. XML schema | CII syntax of the profile, namespaces, element order | Mustang, XRechnung viewer | Wrong namespace |
| 4. Schematron | EN 16931 business rules, plus BR-DE for XRECHNUNG | Mustang, XRechnung viewer, KoSIT validator | Totals don't add up |
| 5. PDF vs. XML | Same number, amounts, VAT and due date | Manual comparison with the extractor summary | Different amount |
| 6. Content | VAT-mandatory details under § 14 (4) UStG, correct VAT rate | Invoice checker, your own review | Wrong VAT rate |
Layers 1 to 4 can be automated. Layers 5 and 6 need a human eye, at least on a sample basis.
Step 1: Check PDF/A-3 conformance with veraPDF
veraPDF (opens in a new tab) is an open-source validator covering all PDF/A parts and conformance levels. It is available as a desktop application and for the command line:
verapdf --flavour 3b invoice.pdf
--flavour 3b sets the check to PDF/A-3b. Level b is sufficient for ZUGFeRD; files in PDF/A-3a or PDF/A-3u are also PDF/A-3.
Typical findings and their causes:
- Font not embedded: the invoicing software uses standard fonts without including them in the file.
- OutputIntent missing: there is no ICC colour profile, which PDF/A requires.
- Wrong PDF/A identification: the XMP metadata lacks
pdfaid:partwith the value 3. - Embedded file without MIME type or AFRelationship: PDF/A-3 requires both for every embedded file.
veraPDF says nothing about the invoice data. A PDF can be fully PDF/A-3 conformant and still contain no XML at all.
Step 2: Check the embedded XML, AFRelationship and XMP
First, the right file has to be inside the PDF. Its name depends on version and profile:
factur-x.xml: ZUGFeRD 2.1 and later, profiles MINIMUM to EXTENDEDxrechnung.xml: XRECHNUNG profilezugferd-invoice.xml: ZUGFeRD 2.0
Our tool to extract XML from PDF invoices shows at a glance which attachments the PDF contains and what the invoice XML is called. The file is processed in your browser only.
The XML must also be linked in the /AF array of the PDF catalogue with an AFRelationship value, usually Alternative. Without that link the XML is just an arbitrary attachment, and many programs ignore it.
In the XMP metadata, the file declares its profile and the XML file name. This is the block for the EN 16931 profile:
<rdf:Description rdf:about=""
xmlns:fx="urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#">
<fx:DocumentType>INVOICE</fx:DocumentType>
<fx:DocumentFileName>factur-x.xml</fx:DocumentFileName>
<fx:Version>1.0</fx:Version>
<fx:ConformanceLevel>EN 16931</fx:ConformanceLevel>
</rdf:Description>
Because fx is not a predefined namespace, the PDF must also contain a PDF/A extension schema describing these properties. If it is missing, veraPDF already reports an error.
The declared profile must match the profile stated in the XML, in BT-24 at rsm:ExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID:
| Profile | Value in BT-24 |
|---|---|
| MINIMUM | urn:factur-x.eu:1p0:minimum |
| BASIC WL | urn:factur-x.eu:1p0:basicwl |
| BASIC | urn:cen.eu:en16931:2017#compliant#urn:factur-x.eu:1p0:basic |
| EN 16931 | urn:cen.eu:en16931:2017 |
| EXTENDED | urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended |
| XRECHNUNG | urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0 |
If BT-24 says MINIMUM or BASIC WL, the file is not an e-invoice for German VAT purposes, even if every technical check passes.
Step 3: Validate the XML against the CII schema
The embedded XML uses the UN/CEFACT CII syntax with the root element rsm:CrossIndustryInvoice and the namespace urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100. Each profile has its own XSD schema. Common schema errors:
- The XML is not well-formed, for example because an element is not closed (SCHEMA-001).
- The namespace or root element is wrong (SCHEMA-002).
- Elements appear in the wrong order. CII enforces a strict sequence.
- Dates use the wrong format:
udt:DateTimeStringwithformat="102"expectsYYYYMMDD, for example20260928. - The file contains elements the declared profile does not allow, such as EXTENDED fields in an EN 16931 file.
These are format errors in the sense of the BMF letter, and the file then does not count as an e-invoice.
Step 4: Check the business rules with Schematron
Schematron rules check the logic of the invoice: mandatory fields, calculations, VAT categories and codes. ZUGFeRD must pass the EN 16931 rules, for example BR-CO-10 for the sum of line net amounts (BT-106) or BR-CO-15 for the total including VAT (BT-112 = BT-109 + BT-110). The XRECHNUNG profile adds the German KoSIT rules, such as BR-DE-15: the buyer reference BT-10 must be provided.
For this step you can use our e-invoice validator. Upload the extracted XML; the viewer checks it against the official EN 16931 and XRechnung rules from KoSIT and explains each message. Our reference of xrechnung validation errors lists every code. One point matters when reading the results: messages prefixed BR-DE apply to XRechnung only. If you are checking an EN 16931 profile file for a business customer, those messages are not decisive. The EN 16931 rules always apply.
The most frequent rule violations and how to fix them are covered in our guide to fix XRechnung validation errors.
Step 5: Compare the PDF with the XML
Automated validators generally do not compare the invoice image with the XML, so this comparison is up to you. The summary in the ZUGFeRD extractor shows the key XML values, which you can place next to the PDF:
- BT-1 invoice number and BT-2 invoice date
- BT-31 seller VAT identifier
- BT-109 net total, BT-110 VAT total and BT-112 gross total
- BT-9 due date and BT-84 payment account (IBAN)
Under section 14c.1 (4a) of the German VAT Application Decree (UStAE), an image part with different invoice details, such as a different VAT amount, may count as a second invoice, with a risk of owing that VAT under § 14c UStG. Rounding differences and descriptions shortened for layout reasons are not challenged.
Step 6: Check the mandatory details and content
Passing validation does not prove the invoice is correct. The BMF gives the example of a wrong VAT rate: if the amounts are arithmetically consistent with it, no validator reports an error. So check the details required by § 14 (4) UStG, such as the date of supply, quantity and type of goods or services, the net amount per VAT rate and, for exempt or reverse-charge supplies, the required note. Our German invoice requirements checker walks you through these points. According to the BMF, validation expressly does not replace the recipient's duty to check an invoice for completeness and accuracy; it supports it.
Which tool checks what?
| Tool | Checks | Does not check | Form |
|---|---|---|---|
| ZUGFeRD extractor (docutools.pro) | Finds and extracts the XML, shows attachments and an invoice summary | PDF/A, Schematron | Browser |
| XRechnung viewer (docutools.pro) | XML (CII and UBL) against KoSIT rules, rendering, error explanations | PDF/A-3, XMP | Browser, XML upload |
| Mustang validator | PDF/A via veraPDF, XML schema, EN 16931 and ZUGFeRD Schematron | Case-specific VAT content | Java, command line |
| veraPDF | All PDF/A levels | Invoice content | Desktop and command line |
| KoSIT validator | XML against the XRechnung configuration (schema and Schematron) | PDF part | Java, command line |
The Mustang project (opens in a new tab) is licensed under Apache 2.0 and checks a ZUGFeRD PDF in one call:
java -Xmx1G -Dfile.encoding=UTF-8 -jar Mustang-CLI-2.26.0.jar --no-notices --action validate --source invoice.pdf
Use the KoSIT validator for the XRECHNUNG profile, and run it on the extracted xrechnung.xml, not on the PDF.
Common errors and how to fix them
| Symptom | Cause | Fix |
|---|---|---|
| No embedded XML found | PDF created with a PDF printer or edited afterwards | Regenerate in the invoicing software; never post-process ZUGFeRD PDFs |
Attachment named invoice.xml or similar | Wrong export setting | Use the file name defined for the profile |
| XMP profile does not match BT-24 | Metadata hard-coded | Configure the profile in one place |
| Font not embedded, OutputIntent missing | Export without PDF/A setting | Enable PDF/A-3 export |
| MINIMUM or BASIC WL profile | Booking aid instead of an invoice | Switch to the EN 16931 profile |
| BR-DE messages on an EN 16931 file | XRechnung rules checked as well | Irrelevant in B2B unless the customer requires XRechnung |
| BR-CO-10 or BR-CO-15 | Line-level rounding differs from the total | Build totals from the rounded line amounts |
What do validation errors mean for VAT?
The BMF letter of 15 October 2025 distinguishes three types of error:
| Error type | Example | Consequence |
|---|---|---|
| Format error (para. 6a) | XML does not match the permitted syntax | Not an e-invoice but an "other invoice" |
| Business-rule error (para. 6b) | Missing BT-10 in an XRechnung, VAT amount inconsistent with the rate | Irrelevant for VAT where the field has no VAT significance |
| Content error (para. 35a) | Missing or wrong mandatory detail under §§ 14 (4), 14a UStG | Invoice not compliant, input VAT deduction at risk |
The letter does not say explicitly whether a pure PDF/A defect with a correct XML harms the invoice for VAT purposes. What counts for the e-invoice is the structured part. Fix PDF/A errors anyway, because receiving systems may reject such files.
Keep the validation report
According to the BMF, a business exercising the care of a prudent merchant may rely on the technical result of a suitable validation tool as far as format and business rules are concerned. As evidence, the BMF recommends keeping the validation report. Store it with the invoice for the same eight-year period. How to file e-invoices and supporting records properly is explained in our guide to e-invoice archiving in Germany.
Validate outgoing invoices before sending and incoming invoices on receipt. After each update of your invoicing software, run a test invoice, because output format and code lists can change. More guides on checks and error messages are collected in the validation and errors category.
Tools for this article
- XRechnung ViewerParse, validate & repair German e-invoices with GoBD-compliant audit trail.Open tool →
- ZUGFeRD / Factur-X XML ExtractorExtract, view and download the embedded e-invoice XML from ZUGFeRD and Factur-X PDFs.Open tool →
- KoSIT Error HubSearchable reference for all XRechnung validation error codes with fix guides.Open tool →
Frequently asked questions
How can I check a ZUGFeRD invoice for free?
Use the open-source veraPDF to check PDF/A-3 conformance. Extract the embedded XML with the docutools.pro ZUGFeRD extractor and check it in the XRechnung viewer against the official KoSIT rules. For a combined check of PDF/A, schema and Schematron in one run, use the free Mustang validator, a Java command-line program published under the Apache 2.0 licence.
What is the difference between veraPDF and the Mustang validator?
veraPDF only checks whether a PDF conforms to the PDF/A standard, for example embedded fonts and colour profiles. It does not assess the invoice XML. The Mustang validator additionally checks the embedded XML against the schema and the Schematron rules of EN 16931 and ZUGFeRD. For its PDF/A check, Mustang itself relies on veraPDF.
Is a ZUGFeRD invoice with validation errors invalid?
It depends on the type of error. Under the German Finance Ministry letter of 15 October 2025, a format error turns the file into an 'other invoice', so it is not an e-invoice. Business-rule errors on fields without VAT relevance, such as a missing BT-10, do not matter for VAT. Missing mandatory details under § 14 (4) UStG make the invoice non-compliant and put input VAT at risk.
Can I check a ZUGFeRD invoice with the KoSIT validator?
Only the XML part. The KoSIT validator processes XML files, not PDFs. Besides its XRechnung scenarios, the XRechnung configuration also has plain EN 16931 scenarios that match the ZUGFeRD EN 16931 profile, and it checks the XRECHNUNG profile against the XRechnung rules. Extract the embedded XML file from the PDF first. Check PDF/A-3 conformance and the XMP metadata separately, for example with veraPDF or Mustang.
Why does the validator report errors when the PDF looks correct?
Because the validator checks the embedded XML, not the invoice image. Many programs generate the PDF and the XML separately, so the two can differ, for example through rounding or missing fields. Under the German Finance Ministry letter of 15 October 2025, the XML is the leading part of a hybrid invoice. Fix the source data and generate the file again.