Create an e-invoice: Easily generate a ZUGFeRD PDF and EN 16931 XML for freelancers and self-employed professionals

For many freelancers, independent professionals, and self-employed people, creating an invoice as a PDF and sending it by email was the standard approach for a long time. Since January 1, 2025, however, an ordinary PDF is no longer generally sufficient to qualify as an e-invoice for VAT purposes. A genuine electronic invoice must contain its invoice details in a structured, machine-readable format and enable automatic electronic processing.

This is exactly where the E-Invoice Generator comes in. The web app helps you enter invoice data in a clear form and use it to generate either a hybrid ZUGFeRD PDF with embedded XML invoice data or a separate EN 16931 XML file. You can also reimport existing ZUGFeRD PDF and XML invoices. This allows many details to be transferred back into the form instead of requiring you to start from scratch with every similar invoice.

The application is stateless: It has no application-specific database and does not permanently store your invoice data as a customer account, draft, or invoice archive. The server processes the submitted information to import data and generate the requested file. You then receive the result directly as a download. The ZUGFeRD PDF you generate can also serve as a local reusable template because the structured invoice data is embedded in it and can be read again later.

This article explains in detail:

  • why e-invoicing is particularly important right now,
  • what distinguishes an e-invoice from a standard PDF,
  • how ZUGFeRD, Factur-X, EN 16931, and XML are related,
  • how to create an invoice with the E-Invoice Generator,
  • how your data is processed without an application-specific database,
  • how to reuse a generated PDF as an invoice template later,
  • and what freelancers, self-employed people, and small businesses should keep in mind.

Why e-invoices are particularly important right now

Germany has revised its VAT rules for invoices. According to the current information from the German Federal Ministry of Finance, the e-invoice has generally been the designated standard for transactions between domestic businesses since January 1, 2025. This applies to the B2B sector, for example when a self-employed service provider invoices another company in Germany.

Transitional rules apply to issuing invoices:

  • From January 1, 2025, through December 31, 2026, invoice issuers may generally continue to use another type of invoice.
  • Under the current rules, if the previous year’s revenue did not exceed 800,000 euros, this transitional period is extended until the end of 2027.
  • Once the transitional periods expire, the e-invoice will become the standard mandatory format for the affected domestic B2B transactions.
  • Domestic businesses have generally been required to be able to receive e-invoices since January 1, 2025. According to the German Federal Ministry of Finance, an email inbox may be sufficient for this purpose.

For freelancers and self-employed people, it makes sense not to wait until the last day of the transitional period. Customers may already request or prefer structured invoices because they want to transfer invoice data directly into accounting, ERP, or approval systems. By addressing e-invoicing early, you can avoid time pressure later and gradually adapt your processes.

The transition is not merely a legal formality. Structured invoice data can eliminate breaks between digital and manual processes. The recipient does not have to retype the invoice number, amount, VAT, date of supply, bank details, and line items from a PDF. This reduces manual work and potential transcription errors.

Note: This article describes how the app works and provides general background information. It is not a substitute for legal or tax advice. For unusual business transactions, exceptions, and retention obligations, review the requirements that apply to you with a qualified professional.

What is an e-invoice?

An e-invoice is not simply any invoice sent electronically. Since 2025, German VAT law has made a clearer distinction between a structured e-invoice and another type of invoice.

A simple PDF invoice is primarily readable by people. It displays text, tables, amounts, and a layout. For software, however, it initially consists of a graphical or textual representation. Individual values would have to be transferred through manual input, text recognition, or a custom-developed analysis process.

A structured e-invoice contains the same business information in defined data fields. For example, software can identify:

  • who issued the invoice,
  • who the invoice recipient is,
  • which invoice number was assigned,
  • the dates of the invoice and the supply,
  • which line items are being charged,
  • which net and tax amounts apply,
  • the total amount due,
  • which bank details should be used,
  • and when the invoice must be paid.

This machine-readable information is typically represented as XML. XML is a text-based markup language that allows data to be structured unambiguously and processed by different software systems.

Why a standard PDF is not a structured e-invoice

An ordinary PDF can be created digitally, sent by email, and read on a screen. Without a structured data component, however, it does not automatically meet the requirements for an e-invoice under the definition in effect since 2025. The German Federal Ministry of Finance refers to paper documents and unstructured electronic formats such as simple PDF files as other invoices.

This does not mean that PDFs will disappear as a visual representation. Many people still want to open, view, print, or visually review an invoice. A hybrid format therefore combines a readable PDF with machine-readable XML data. This is the fundamental idea behind ZUGFeRD and Factur-X.

What is ZUGFeRD?

ZUGFeRD is a hybrid e-invoice format. It combines two representations in one file:

  1. a visually readable PDF invoice for people,
  2. structured XML invoice data for software.

You can open the file like a standard PDF. At the same time, compatible accounting software can read the embedded XML data set. This makes the document suitable both for conventional visual review and automated downstream processing.

The E-Invoice Generator first creates a readable invoice as a PDF. It then embeds the structured invoice data in the document using the Mustangproject ZUGFeRD exporter. The export uses the EN 16931 profile. The result is a hybrid invoice: The PDF and XML belong together and are downloaded as a single PDF file.

This combination is particularly practical for small businesses and self-employed people. You can send your customer a familiar PDF without sacrificing a machine-readable invoice data set.

What do Factur-X and PDF/A-3 mean?

Factur-X is the French-German name or implementation of the hybrid invoice approach closely associated with ZUGFeRD. The app’s technical implementation uses Mustangproject’s Factur-X/EN 16931 profile.

Technically, embedding an XML file in an invoice is based on a PDF/A-3-oriented export process. PDF/A is a family of formats for PDF documents that can be reproduced over the long term. PDF/A-3 makes it possible to embed additional files such as XML in the PDF.

For users, the result is what matters most:

  • The invoice remains visually readable.
  • The structured data travels together with the PDF.
  • Compatible software can read the embedded invoice information.
  • The generated file can be imported into the E-Invoice Generator again later.

As with any electronic invoice format, it is advisable to additionally check files intended for actual business use with a suitable e-invoice validator. The app is not a substitute for external certification and does not guarantee compliance for every conceivable tax-related or industry-specific special case.

What is EN 16931?

The European series of standards EN 16931 describes a semantic data model for electronic invoices. Put simply, it defines which business information a structured invoice can contain and how that information is to be understood unambiguously.

The standard creates a common foundation for different e-invoice formats. Instead of each software application interpreting invoice numbers, tax amounts, or payment information differently, defined business terms can be used.

Typical contents of the structured data set include:

  • invoice number and invoice date,
  • seller and buyer,
  • tax identification details,
  • delivery or service date,
  • invoice line items,
  • quantities and units,
  • net prices and tax rates,
  • net, tax, and gross totals,
  • payment terms and due date,
  • bank details,
  • Buyer Reference or Leitweg-ID.

The E-Invoice Generator uses an EN 16931 profile for its exports. In addition to the hybrid ZUGFeRD PDF, it can generate a separate XML data set. This XML export is particularly helpful if a recipient explicitly requires a machine-readable file and does not need an additional PDF representation.

ZUGFeRD, EN 16931 XML, and XRechnung: What is the difference?

These terms are often searched for together, but they do not mean exactly the same thing.

ZUGFeRD

ZUGFeRD is a hybrid format. The structured XML is embedded in a visually readable PDF. The invoice recipient therefore receives one file for people and machines.

EN 16931 XML

An EN 16931-based XML file focuses on the structured invoice data. It is intended for automatic processing and does not automatically have a convenient visual representation. An e-invoice viewer can be used to read it.

XRechnung

XRechnung is an implementation for structured invoices commonly used in Germany and maintained by the Coordination Office for IT Standards (KoSIT). It is used particularly in the public-sector contracting environment and has additional business rules. An arbitrary EN 16931 XML file should therefore not be treated as equivalent to a fully validated XRechnung without verification.

The app generates a separate XML export using the EN 16931 profile of the Mustangproject provider in use. If your client explicitly requires an XRechnung of a specific version or for a particular government portal, you should check the generated file against the recipient’s requirements with the designated validator before submitting it.

Who is the E-Invoice Generator suitable for?

The E-Invoice Generator is primarily designed for people who regularly create manageable, similarly structured invoices in euros:

  • freelancers,
  • independent professionals,
  • solo self-employed people,
  • small businesses,
  • small service companies,
  • contractors with recurring customers,
  • and users who want to create a simple e-invoice without extensive accounting software.

The app is particularly useful if you issue only a few invoices per month or have previously created your invoices manually. Instead of setting up a complete ERP or accounting system, you can enter the necessary details in a compact web form.

However, the application is not an invoice archive, customer management system, or complete financial accounting system. It does not manage sequential number ranges, send invoices automatically, or transmit files directly to government portals or Peppol networks. This clear limitation is part of its stateless approach.

Create an e-invoice step by step

1. Enter sender details

First, enter the invoice issuer’s details. These include:

  • name or company name,
  • street and building number,
  • postal code and city,
  • tax number,
  • VAT identification number, if applicable,
  • IBAN and, optionally, BIC,
  • email address and telephone number, if desired.

These details appear on the readable invoice and, where supported by the data model, are also included in the structured invoice data set.

2. Add recipient details

Next, enter the customer’s name, address, and VAT ID, if applicable. A field for the Buyer Reference is also available. For invoices to a public authority, a Leitweg-ID can be entered there if the public-sector customer requires it.

A Leitweg-ID is generally not required in ordinary B2B transactions between businesses. However, a Buyer Reference can still be helpful if, for example, your customer specifies a purchase order number, project number, cost center, or supplier number for internal allocation.

3. Define invoice details

In the invoice metadata section, specify:

  • subject,
  • unique invoice number,
  • invoice date,
  • service date or service period,
  • payment term in days.

The app calculates the due date from the invoice date and payment term. For the service reference, you can use either a single date or a complete period.

You must assign the invoice number yourself according to your business’s numbering system. The app does not store a number range or check which invoice number you previously used.

4. Enter invoice line items

Create a line item for each service. The following are supported:

  • quantity,
  • unit,
  • description,
  • net unit price,
  • VAT rate.

The available units are items, hours, days, and flat rate. Line items can be added, copied, or removed. Copying is useful when several services differ only in their description, quantity, or price.

The web interface calculates the net, VAT, and gross totals as you enter the data. During export, the amounts are also recalculated on the server. VAT rates of 19 percent, 7 percent, and 0 percent are supported.

5. Select the small business regulation

If you enable the small business option under Section 19 UStG, the app sets the invoice line items to 0 percent VAT and adds a corresponding note to the invoice.

Small businesses should note: According to the current information from the German Federal Ministry of Finance, supplies by small businesses are exempt from the obligation to issue an e-invoice. However, they must generally be able to receive e-invoices. A structured invoice may nevertheless be useful on a voluntary basis, for example if business customers prefer a machine-readable format.

If you are uncertain whether the small business regulation applies in your specific case or which wording is required, you should seek tax advice.

6. Choose the export format

Finally, you can choose between two output types:

  • ZUGFeRD PDF: a readable PDF invoice with embedded XML data,
  • XML: a separate structured invoice data set based on the EN 16931 profile.

After submission, the app validates the form data, generates the file in memory, and provides it directly as a download. The file name contains the invoice number and customer name so that the document is easier to identify.

Import an existing invoice and use it as a template

The greatest practical time savings often come not with the first export, but with the next invoice. Many freelancers invoice the same customers every month. The sender, address, bank details, contact person, and a large proportion of the line items rarely change.

Instead of entering everything again, you can upload an existing ZUGFeRD PDF or a supported XML invoice. The server reads the structured invoice data set and repopulates the form as far as possible.

The details that can be transferred include:

  • sender name and address,
  • tax number and VAT ID,
  • first bank account included,
  • email address and telephone number,
  • recipient name and recipient address,
  • Buyer Reference,
  • invoice number and invoice date,
  • service date or service period,
  • payment term,
  • subject and notes,
  • invoice line items with quantity, unit, price, and tax rate.

You then only need to update the details that have changed. These are typically:

  • the new invoice number,
  • the current invoice date,
  • the new service date,
  • the hours actually worked or quantities actually delivered,
  • individual descriptions,
  • and the price, if applicable.

You then export the new invoice again as a ZUGFeRD PDF or EN 16931 XML. In this way, the most recently generated file becomes your locally stored invoice template, without the app itself having to maintain a customer account or template database.

Why the PDF is particularly practical as a reusable template

With a conventional template feature, an application would permanently store your customer and invoice data in a database. The E-Invoice Generator takes a different approach: The file you download already contains the reusable structured data.

This offers several advantages:

  • You decide where to store the invoice.
  • You can use your existing folder structure, cloud storage, or document management system.
  • The app does not require a user account for your templates.
  • You do not have to reenter master data for similar follow-up invoices.
  • The PDF representation and XML data remain together in one ZUGFeRD file.

It is important to distinguish between a reusable template and archiving. The import feature makes it easier to fill in the form again. However, it is not a substitute for an audit-proof archive or a legally required retention solution.

According to the current information from the German Federal Ministry of Finance, at least the structured component of e-invoices must be retained in a way that preserves it intact in its original form. For VAT purposes, the retention period is currently generally eight years. You should therefore organize your original files independently of the app in accordance with your legal and operational requirements.

How is invoice data handled without permanent storage?

Invoices involve sensitive business data: names, addresses, tax details, prices, service descriptions, and bank details. It is therefore important to understand exactly what “stateless” means for this application.

The E-Invoice Generator has:

  • no application-specific invoice database,
  • no user accounts with stored master data,
  • no permanent draft management,
  • no internal invoice archive,
  • no permanently stored template library.

When you create an invoice, your browser sends the form data to the server. The server checks the entries, calculates the totals, and uses them to generate the PDF and XML. The completed file is returned directly to your browser. During an import, the selected PDF or XML file is also transferred to the server, read there for that operation, and converted into form data.

The application itself does not write this invoice data to a database or store it as a record that can be retrieved later. Once you have downloaded the completed file, you are responsible for its permanent storage.

This is more precise than saying that all processing takes place exclusively in the browser. In the publicly available web app, imports and exports are processed on the server. If you run the application locally or within your own network, you can keep this processing within your own infrastructure.

As with any web service, technical infrastructure or access logs outside the application itself may play a role. The stateless approach means that the app does not persist invoice content as a repository of business data. It does not replace a review of the data protection and hosting terms of the installation being used.

Create a local e-invoice through self-hosting

If you want the server-side processing to take place in your own environment as well, you can host the E-Invoice Generator yourself. The application is based on Java 17, Spring Boot, and Thymeleaf and can be started directly with Maven or via Docker.

For a local start with Maven, you need Java 17 and Maven 3.9 or newer:

mvn spring-boot:run

You can then access the app at:

http://localhost:8080

Alternatively, you can build a Docker image and start it as a container:

docker build -t erechnung:latest .
docker run --rm -p 8080:8080 erechnung:latest

With self-hosting, the form, imports, and exports are processed on your own computer, server, or within your own network. For publicly accessible installations, you should use HTTPS through a reverse proxy, set a strong password, and take the general requirements for secure server operation into account.

Benefits for freelancers and self-employed people

Less repetitive data entry

Most invoices consist largely of details that are already known. By importing an existing invoice, you can use these details as the starting point for the next invoice.

No extensive accounting system required

If you only want to generate structured outgoing invoices, you do not necessarily need a complete enterprise resource planning system. The app focuses on a clear workflow: enter, review, and export data.

Readable PDF and structured data in one file

ZUGFeRD combines the familiar PDF with embedded XML. Your customer can view the invoice and, with suitable software, process it automatically.

Transparent data storage

There is no application-specific database containing permanently stored invoice drafts. You store the generated file yourself and can import it again later.

Automatic calculation

Net, VAT, and gross amounts are calculated from the invoice line items. Different supported tax rates are totaled separately.

Support for recurring services

Especially for monthly consulting services, development hours, design work, or fixed service fees, invoices often differ in only a few details. Line items can be copied, and imported data can be adjusted as needed.

What are the app’s limitations?

A reputable e-invoice generator should not promise more than it actually delivers. The application is deliberately streamlined and covers typical, straightforward invoices for German freelancers and self-employed people.

You should currently be aware of the following limitations in particular:

  • Invoices are created in euros.
  • The sender and recipient are represented as German parties.
  • VAT rates of 19 percent, 7 percent, and 0 percent are supported.
  • The available units are items, hours, days, and flat rate.
  • There is no permanent customer, template, or invoice management.
  • Invoice numbers are not automatically managed in sequence.
  • The app does not provide GoBD-compliant or audit-proof archiving.
  • Invoices are not sent automatically by email, Peppol, or a government portal.
  • Special cases such as credit notes, cancellation invoices, discounts, surcharges, advance invoices, and foreign currencies are not supported as dedicated workflows.
  • The invoice issuer remains responsible for the professional review of all mandatory information and special cases.
  • External technical validation of the completed document is recommended for actual business use.

If your invoicing scenario is more complex, your customer requires a specific XRechnung version, or a portal checks additional business rules, you should use a specialized solution or suitable validator.

Frequently asked questions about e-invoices

How can I create an e-invoice?

With the E-Invoice Generator, you enter the sender, recipient, invoice details, and line items in a web form. You then choose either a ZUGFeRD PDF with embedded XML data or a separate EN 16931 XML export and download the generated file.

Is a PDF sent by email an e-invoice?

For transactions from January 1, 2025, onward, a simple, unstructured PDF is generally no longer considered an e-invoice for VAT purposes. An e-invoice requires a structured electronic format that enables automatic processing. A ZUGFeRD PDF additionally contains machine-readable XML data for this purpose.

What is a ZUGFeRD invoice?

A ZUGFeRD invoice is a hybrid document. It consists of a visible PDF invoice and a structured XML data set embedded in it. People can read the PDF, while software can process the XML.

Where is the XML located in a ZUGFeRD PDF?

The XML file is included as an embedded file in the PDF document. When you open the invoice normally, you primarily see the designed PDF. E-invoice software and suitable validation tools can detect and read the XML attachment.

What is the advantage of PDF plus XML?

The PDF provides a familiar visual representation. The XML enables invoice data to be transferred automatically. This makes a hybrid e-invoice suitable both for manual checks and digital accounting processes.

Is my invoice data stored?

The app has no application-specific database and does not permanently store invoice data as an account, draft, or archive. Form data and uploaded files are transferred to the server for import or export and processed there for the respective operation. The generated result is downloaded directly and stored by you.

Does the data remain exclusively on my computer?

Not entirely when using a publicly hosted instance: Imports and exports are processed by the server. However, the application does not permanently store the invoice data itself. If you run the app on your own computer or network, the server-side processing also remains within your own environment.

Can I use an old invoice as a template?

Yes. You can import a supported ZUGFeRD PDF or XML invoice. Recognized sender, recipient, invoice, and line-item data is transferred into the form. You then change details such as the invoice number, date, service period, and quantities and generate a new invoice.

Does the app store my invoice templates?

No. There is no permanent template management. Instead, you store the generated ZUGFeRD PDF yourself. Because it contains structured XML data, it can be imported again later and used as a reusable template.

Is the app suitable for recurring invoices?

Yes, especially if invoices differ only in individual line items, quantities, or dates. However, the app does not generate invoices automatically on a schedule. You import an existing file, adjust it, and manually export the new invoice.

Can small businesses create an e-invoice?

The app includes an option for the small business regulation under Section 19 UStG and creates line items without VAT being shown. According to current information from the German Federal Ministry of Finance, supplies by small businesses are exempt from the obligation to issue an e-invoice; however, they must generally still be able to receive e-invoices. A voluntary structured invoice can nevertheless be useful for business customers.

Do I need a Leitweg-ID for a B2B e-invoice?

Generally not in ordinary B2B transactions. A Leitweg-ID is used particularly for invoices to public authorities. In B2B transactions, the Buyer Reference field can also be used for an internal reference required by the customer.

Is EN 16931 XML the same as XRechnung?

Not automatically. EN 16931 provides the European semantic foundation. XRechnung defines this foundation more specifically for certain German requirements and adds business rules. If a recipient explicitly requires an XRechnung, the file should be validated against the required XRechnung version.

Do I have to validate an e-invoice?

The German Federal Ministry of Finance recommends validation because it can identify missing or illogical mandatory information. It helps detect technical errors before dispatch and processing. For government portals or customer-specific requirements, checking the file with the designated validator is particularly important.

Does the E-Invoice Generator archive my invoices in a legally compliant manner?

No. The app generates and imports invoice files but does not provide audit-proof or GoBD-compliant archiving. You must retain the original files yourself in accordance with the legal requirements that apply to you.

Can I run the app locally?

Yes. The Spring Boot application can be started with Java and Maven or as a Docker container. This means that server-side processing takes place on your own infrastructure.

Conclusion: Prepare for structured invoices now

The e-invoice changes not only the file format but the entire way invoice data is handled. While a conventional PDF is mainly intended for reading, a structured e-invoice can be processed directly by software. This reduces manual data entry, eliminates breaks between digital and manual processes, and prepares freelancers and self-employed people for increasing legal and business requirements.

The E-Invoice Generator offers a pragmatic way to get started:

  • enter invoice data clearly in the browser,
  • calculate totals automatically,
  • create a ZUGFeRD PDF with embedded XML data,
  • export a separate EN 16931 XML data set,
  • import existing invoices as reusable templates,
  • and work without an application-specific invoice database.

The ability to reuse data is particularly helpful: The generated ZUGFeRD PDF is not only the completed invoice document but can also serve as a data source for the next similar invoice. You store the file yourself, import it when needed, and only adjust the details that have actually changed.

The live application is available at rechnung.dokubasis.de. To process data in your own environment, you can run the application locally or on your own infrastructure.

Further official information

Legal information current as of August 2026. Legal requirements and technical standards may change. The applicable current legislation, administrative guidance, and requirements of the invoice recipient are authoritative.