In short:
- An XRechnung is created most reliably directly from the structured data in your accounting or invoicing software — not by "converting" a finished PDF afterwards.
- An existing PDF invoice cannot be automatically and error-free converted into a valid XRechnung — the structured data simply isn't there.
- An invoice generator or an ERP connection is all you need to actually create one; writing the XML file by hand is practically never worthwhile.
- Every file should be checked with a validator before it's sent.
What is an XRechnung — briefly explained
An XRechnung is a purely XML-based invoice data set based on the European standard EN 16931, originally developed for invoices to public authorities (B2G) and now also widely used in B2B. You'll find a detailed explanation of its structure, mandatory fields, and the transition deadlines through 2028 in our foundational article "What is XRechnung?". This article focuses on the practical question: how do you actually create an XRechnung — especially if you've worked with PDF invoices until now?
Who is this guide for?
For businesses and freelancers who either need to create an XRechnung for the first time (e.g. because a B2B customer or a public authority requires it), or who want to move away from their current Word- or PDF-based invoicing process before the mandatory-transmission deadline in 2027/2028 catches up with them.
The three realistic ways to create an XRechnung
1. Export from your accounting or ERP software
The cleanest approach: your software already knows all the relevant data (customer, line items, tax rates) and generates a valid EN 16931 XML file directly from it. Errors here almost only arise from incomplete master data.
2. A cloud-based invoice generator
For freelancers, small businesses, and anyone without their own ERP integration, an online generator is the most practical route. You enter the invoice data as usual, and the system creates a compliant XRechnung or ZUGFeRD file in the background. With our platform, you can create an e-invoice without ever having to deal with the XML structure yourself.
3. Manual creation in a text editor
Theoretically possible, practically not advisable: the EN 16931 XML structure is complex and error-prone when written by hand. A single incorrectly placed tag causes the file to be rejected by the recipient's system.
Can I simply convert an existing PDF invoice into an XRechnung?
This is the question that occupies most businesses when they make the switch — and the answer is more nuanced than many providers suggest.
The core problem: a PDF is designed for the human eye, not for machines. It doesn't contain a structured field called "invoice amount" or "customer VAT ID" — only text positioned at certain points on the page. A "PDF-to-XRechnung converter" therefore first has to read this text via optical character recognition (OCR) and then guess which number belongs to which field.
That often works reasonably well with cleanly and consistently formatted PDFs — but "often" isn't good enough for a tax-relevant document. An incorrectly recognized tax rate, a transposed digit in the invoice amount, or an incompletely read VAT ID makes the resulting XRechnung invalid or factually wrong, without you necessarily noticing when you send it.
The more reliable alternative: instead of converting the finished PDF after the fact, regenerate the XRechnung from the same data source the PDF originally came from — your accounting system, your invoicing software, or, as a last resort, by manually re-entering the few affected line items into a generator. For individual invoices, this takes a little more time than an automatic "convert" click, but it produces a result whose content you actually know and can stand behind.
If you regularly need to migrate large numbers of old PDF invoices, it's worth checking your accounting system: most programs can export invoice data directly, without taking the detour through the PDF.
Step by step: creating your first XRechnung
- Check your master data: your tax number or VAT ID, IBAN, and company address must be complete and correct.
- Enter customer data: full name, address, and — for public authorities — the Leitweg-ID (routing ID).
- Enter line items: description of goods/services, quantity, price, and tax rate for each item.
- Choose a format: XRechnung (pure XML) or ZUGFeRD (hybrid with a PDF), depending on what your recipient requires.
- Validate: check the generated file before sending it (see the next section).
- Send it: by email, via the Peppol network, or directly through your customer's or the authority's invoice-receiving platform (ZRE/OZG-RE in Germany).
Validating your XRechnung before sending it
No matter how your XRechnung was created — a technical check before sending is always worthwhile. With our ZUGFeRD Validator you can check XML files for structural errors and EN 16931 compliance before your customer's system possibly rejects them.
Common mistakes when switching from PDF to XRechnung
- Blindly trusting automatic converters: the result is sent without checking the extracted amounts and tax rates.
- Incomplete master data: a missing or outdated VAT ID leads to rejection, regardless of how the file was created.
- Choosing the wrong format: a public authority requires XRechnung, but ZUGFeRD is sent instead (or vice versa), because nobody asked beforehand.
- Forgetting the Leitweg-ID: for B2G invoices, a missing field leads to automatic rejection by the central platforms.
Frequently Asked Questions (FAQ)
Can I automatically convert an existing PDF invoice into an XRechnung? Not reliably. A PDF contains no structured data, only a visual layout. Tools that "convert" PDFs via OCR extract text and guess the field mapping — errors in amounts, IDs, or tax rates are possible, and risky for a tax-relevant document. It's safer to regenerate the XRechnung directly from the original invoice data.
Is a free XRechnung converter from the internet good enough? A converter can be useful for a quick check, but it doesn't replace verifying the data it produced. Always check the result with a validator before sending the file.
Do I need software myself to receive XRechnung files? Yes. Since January 1, 2025, all businesses in Germany must be technically able to receive and display structured e-invoices — usually, software that can render XML files readably is enough.
What's the difference between XRechnung and ZUGFeRD when creating an invoice? XRechnung is a pure XML data set with no visual representation; ZUGFeRD is a PDF/A-3 file with embedded XML. XRechnung is usually mandatory for sending to public authorities, while ZUGFeRD is often preferred in B2B because it remains readable as a PDF.
Do I also need a Leitweg-ID for B2B customers? No, the Leitweg-ID is a mandatory field only for invoices to public-sector clients (B2G). It's not required for regular B2B customers.
Conclusion
Creating an XRechnung is technically straightforward once you take the data from the right source — directly from your software or a generator, not from a PDF "converted" after the fact. If you issue invoices regularly, you should prepare for the switch now rather than waiting until the mandatory transmission deadline in 2027/2028.




