Archiving e-invoices: retention, XML, GoBD
E-invoices must be kept for eight years, counted from the end of the calendar year in which the invoice was issued (§ 14b para. 1 UStG, the German VAT Act; § 147 para. 3 AO, the German Fiscal Code). The ten years that applied previously were replaced on 1 January 2025, including for older invoices whose period was still running on that day; exceptions apply to banks, insurers and investment firms. At least the structured part must be kept, that is the XML file, unchanged in the format in which the invoice was received or created. A printout or a file converted into an image does not replace it.
Written by Marwan Saleh (Development). As of 21 November 2026. Technical and general explanation, not tax advice.
How long must e-invoices be kept: 8 or 10 years?
Eight years. The law says so three times: in § 14b para. 1 UStG for all incoming and outgoing invoices, in § 147 para. 3 AO for accounting vouchers and in § 257 para. 4 HGB (the German Commercial Code) for the accounting vouchers of merchants. An e-invoice is no exception; the same period applies to it as to any other invoice (BMF FAQ, question 13).
| Document | Period | Provision |
|---|---|---|
| Incoming and outgoing invoices, including e-invoices | 8 years | § 14b para. 1 sentence 1 UStG |
| Accounting vouchers | 8 years | § 147 para. 1 no. 4, para. 3 AO; § 257 para. 1 no. 4, para. 4 HGB |
| Books, records, annual financial statements and the working instructions and organisational documents needed to understand them | 10 years | § 147 para. 1 no. 1, para. 3 AO |
| Commercial or business letters received and copies of those sent | 6 years | § 147 para. 1 no. 2 and 3, para. 3 AO |
| Accounting vouchers at banks, insurers and investment firms | 10 years | § 257 para. 4 sentence 2 HGB; Art. 97 § 19a para. 3 EGAO |
| Private individual receiving a taxable supply in connection with a property, for example a tradesperson's work on the house | 2 years (invoice, proof of payment or other conclusive document) | § 14b para. 1 sentence 5 UStG |
When the period begins and ends
For invoices, the period begins at the end of the calendar year in which the invoice was issued (§ 14b para. 1 sentence 3 UStG). For accounting vouchers, § 147 para. 4 AO and § 257 para. 5 HGB generally refer to the year in which they were created. However, it does not expire as long as and insofar as the documents are relevant for taxes whose assessment period has not yet expired (§ 147 para. 3 sentence 5 AO). Before deleting anything, it is therefore worth a quick check with your tax adviser.
| Invoice issued in | Period begins | Period ends at the close of |
|---|---|---|
| 2017 | 31.12.2017 | 31.12.2025 |
| 2018 | 31.12.2018 | 31.12.2026 |
| 2026 | 31.12.2026 | 31.12.2034 |
Why many sources still say ten years
Until the end of 2024, ten years applied to accounting vouchers. The Fourth Bureaucracy Relief Act (Viertes Bürokratieentlastungsgesetz) shortened the period in commercial and tax law to eight years. The new period applies to all documents whose period under the old law had not yet expired on 31 December 2024 (Art. 97 § 19a para. 2 EGAO for the AO, § 27 para. 40 sentence 1 UStG for § 14b UStG). Different transitional rules apply to credit institutions, insurers and investment firms (Art. 97 § 19a para. 3 EGAO, § 27 para. 40 sentence 2 UStG). Ten years remain for books, annual financial statements and the documents needed to understand them.
How must an e-invoice be kept?
In the original. An invoice must generally be kept in the format in which it was received. With an e-invoice, at least the structured part must be kept so that it is intact in its original form (section 14b.1 para. 1 UStAE, the German VAT application decree). The tax authorities must be able to evaluate it by machine (section 14b.1 para. 5 UStAE). The GoBD (the German principles for proper electronic bookkeeping and record keeping) say the same for all incoming electronic documents: invoices in XML format remain XML (GoBD para. 131).
- XRechnung: the XML file is the invoice. A view in the viewer or a PDF created from it is only a rendering and does not replace the file.
- ZUGFeRD: the structured part is enough. The PDF must also be kept if it contains additional or different details relevant for tax, for example booking notes or a qualified electronic signature (GoBD para. 119 and 131). The simplest approach is to keep the whole file unchanged.
- Outgoing invoices: a copy must be kept (§ 14b para. 1 UStG). If an invoicing program creates the invoice, no additional PDF copy needs to be stored if an identical copy in terms of content can be produced at any time; for this, master data, terms and conditions and layout, among other things, must be kept with their history (GoBD para. 76).
- Signature: if an invoice arrived with a qualified electronic signature, the signature must also be kept as evidence (section 14b.1 para. 6 UStAE), as must the verification keys used (GoBD para. 134).
How to archive an incoming e-invoice
- 1Save the file as it arrived, without opening and saving it again.
- 2Assign a unique index, for example supplier, invoice number and date of receipt (GoBD para. 122). Every booking must be linked to its voucher (GoBD para. 82).
- 3Log receipt, filing and any conversion (GoBD para. 117).
- 4Protect against changes and deletion and back up regularly (GoBD para. 103 and 110).
- 5Describe the process once in the procedural documentation (GoBD para. 151 et seq.).
VAT law and the Fiscal Code apply different standards
For VAT purposes, it is regularly not a breach of § 14b UStG if e-invoices are stored outside a GoBD-compliant system (section 14b.1 para. 1 sentence 5 UStAE; BMF FAQ, question 13). The obligations under the Fiscal Code and the GoBD remain unaffected for other purposes, however (section 14b.1 para. 6 UStAE). Anyone who has to keep books or records, including with a cash-basis income statement (Einnahmenüberschussrechnung), therefore still needs filing in line with the GoBD (GoBD para. 115).
Is it enough to print out the e-invoice and file it?
No. Documents received electronically must be kept in that form and may no longer be kept only as printouts; they must remain unchangeable for the duration of the period (GoBD para. 119). This also applies to an invoice that came as a simple PDF by email. Only for letters that you created electronically yourself and sent on paper do the GoBD not object to filing on paper only.
What the GoBD require: immutability and traceability
The GoBD are the BMF's principles for the proper keeping and retention of electronic documents. For e-invoices, these requirements matter most:
- Immutability: a record must not be changed in such a way that the original content can no longer be determined (§ 146 para. 4 AO). Changes and deletions must be logged (GoBD para. 58 and 59).
- Traceability: a knowledgeable third party must be able to check the filing within a reasonable time. No particular filing system is prescribed (GoBD para. 117).
- Machine readability: it must not be reduced, for example by conversion into an image format (GoBD para. 129).
- Availability: the documents must be available at all times during the whole period, and it must be possible to make them legible without delay and evaluate them by machine (§ 147 para. 2 AO).
- Data security: the system must be protected against loss and unauthorised changes (GoBD para. 103).
The term „revisionssicher“ (audit-proof) does not appear in the GoBD. In practice it usually means exactly what is described here: unchangeable, complete, retrievable and traceably documented. Important for choosing where to store: filing in an ordinary file system regularly does not meet the immutability requirement unless additional measures secure it (GoBD para. 110).
What must the procedural documentation look like?
Every IT system needs clearly structured procedural documentation (Verfahrensdokumentation) from which content, structure, process and results emerge completely and coherently. Its scope depends on what is needed to understand it; the specific form depends on the business activity, organisation and the system used (GoBD para. 151). It usually consists of four parts (GoBD para. 153), here with examples for e-invoices:
- General description: which invoices arrive where and who is responsible.
- User documentation: how employees check, file and book an e-invoice.
- Technical system documentation: which programs and storage are used, in which version.
- Operating documentation: data backup, access rights, handling of faults.
For e-invoices, it describes the path from creation or receipt via index, processing and storage to retrieval, machine evaluation, protection against loss and falsification, and reproduction (GoBD para. 152). It must match the process actually followed, changes must be versioned and traceable, and its retention period does not expire as long as the period for the documents it explains is running (GoBD para. 154). If it is missing or incomplete without traceability suffering, there is no formal defect of material weight (GoBD para. 155).
What helps technically with archiving?
The GoBD leave open how immutability is achieved: through hardware, for example with unchangeable storage media; through software, for example with locks, finalisation, logging and versioning; or organisationally via access rights (GoBD para. 110). The following table separates what is required from what merely helps.
| Measure | What it does | Legal basis |
|---|---|---|
| Filing in the format received, XML and ZUGFeRD PDF unchanged | The structured part is preserved in the original. | Required: GoBD para. 131, section 14b.1 para. 1 UStAE |
| Unique index per invoice | The invoice remains retrievable under its index for the whole period. | Required: GoBD para. 122, unless management is verifiably possible without an index |
| Log of receipt, filing and conversion | It remains traceable what happened to the file and when. | Required: GoBD para. 117 |
| Access rights and data backup | Protection against loss and unauthorised changes. | Required: GoBD para. 103 and 110 |
| Storage with write protection or retention lock | Files can neither be changed nor deleted until the end of the period. | Option: one way under GoBD para. 110, no particular product prescribed |
| Store a checksum (hash, for example SHA-256) on receipt | A later comparison shows that the file is unchanged. | Option: not explicitly named in the law or the GoBD |
| Keep the validation report with the invoice | Shows that the file was technically checked on receipt or dispatch. | Recommended by the BMF (letter of 15 October 2025, marginal no. 35a), not mandatory |
A checksum is a short fingerprint of a file. If even one character changes, the checksum changes. If it is stored on receipt, separately from the file and itself protected, it can be shown years later that the archived file is the same. However, it replaces neither write protection nor data backup. What a validation report from the KoSIT validator looks like is shown in our validation record.
ZUGFeRD, XML and conversion: what is allowed?
- It is not allowed to reduce machine readability. The GoBD explicitly name the conversion of PDF/A-3 files into an image format such as TIFF or JPEG, because the XML data they contain is lost in the process (GoBD para. 129 and para. 125, example 10).
- Conversion into your own format is permitted if machine readability is not restricted and nothing is changed in content. In that case both versions must generally be archived, under the same index, with the converted one marked as such (GoBD para. 133 and 135).
- Only the converted version is enough if nothing is changed visually or in content, no information subject to retention is lost, the conversion is described in the procedural documentation and evaluation and data access are not restricted (GoBD para. 135).
- Anyone who extracts text by text recognition (OCR) also keeps this information after checking it (GoBD para. 131).
In practice this means: always keep the XML or the ZUGFeRD file in the original. Whatever you create in addition for reading, for example a PDF from the viewer, is a copy. How XRechnung and ZUGFeRD are structured is explained in the guide XRechnung and ZUGFeRD.
How do I archive invoices that arrive by email?
It is the invoice that must be kept, not the envelope. If an email only serves as a means of transport for the attached invoice and contains nothing else that must be kept, it does not have to be kept (GoBD para. 121). The attachment must be filed in the format received. Converting an email into another format, for example from MSG to PDF, is permitted under the conditions of para. 135 (GoBD para. 131). Please note: if an email is saved as a PDF, the header data is lost and it is no longer traceable how the email was actually received; this is at your own risk (GoBD para. 129).
May I archive e-invoices in the cloud or free of charge?
The law does not prescribe a particular program or a paid archive. What matters is that the requirements above are met and the tax office can access the data. For the storage location:
- Entrepreneurs established in Germany keep invoices in Germany. Electronically, they may also be stored in the rest of the EU, if full online access including download and use is possible; the tax office must then be informed of the storage location (§ 14b para. 2 UStG).
- Outside the EU, electronic storage is only possible with the tax office's approval on application (§ 14b para. 5 UStG, § 146 para. 2b AO).
- If the data is held by a service provider, you remain responsible for retention. If you inform the tax authority that the data is held by a third party, that party must provide the access, evaluation or data transfer provided for by law (§ 147 para. 6 sentence 2 AO).
- The obligations apply regardless of whether the data is in the live system or moved to an archive (GoBD para. 119).
So free of charge does not mean impermissible. A simple folder, whether on your computer or in a storage service, is however filing in a file system and regularly does not satisfy the GoBD without additional measures (GoBD para. 110). According to the BMF, the e-invoice viewer in the ELSTER portal (the German tax authorities' online portal) is meant for displaying e-invoices in readable form (BMF FAQ, question 12a); it is not described there as an archive.
Archiving with DATEV, Lexware or another program
If your accounting or invoicing program offers storage for vouchers, the provider describes what it does. We have not checked these features. Ask about these points:
- Is the XML file stored unchanged in the format received, including with ZUGFeRD?
- Are changes and deletions locked or logged?
- Does the data remain available for eight years, even after cancellation or a change of program? When changing systems, the data must be transferred in an equivalent form, otherwise the old system must be kept available (GoBD para. 142 and 143).
- Can the data be provided in machine-readable form for a tax audit (§ 147 para. 6 AO)?
- Is there a description that you can take over into your procedural documentation?
Do small businesses have to archive e-invoices?
Yes. § 14b para. 1 UStG obliges every entrepreneur, and small businesses are entrepreneurs (BMF FAQ, question 3). They must keep received invoices and copies of their own invoices for eight years. Since 1 January 2025 they too must be able to receive e-invoices (BMF FAQ, question 12); the same applies to these as above: the XML in the original. Whether small businesses have to issue e-invoices themselves is explained in the guide E-invoices in special cases.
What does a tax audit check for e-invoices?
What exactly is checked is set out in the audit order (GoBD para. 158). For electronic documents, the tax authority has three ways of accessing data in an external audit (§ 147 para. 6 AO):
- 1Inspecting the stored data and using your system for the audit.
- 2Evaluation of the data according to its specifications by you or a service provider.
- 3Transfer of the data in a machine-readable format.
For this you must provide the means to make the documents legible and print them on request (§ 147 para. 5 AO). On request, this also includes the parts of the procedural documentation that give an overview of the system (GoBD para. 160). For e-invoices this means: the XML files should be complete and unchanged, it should be possible to match them to the bookings, and the process should be described. A stored validation report can show that an invoice was technically checked (BMF letter of 15 October 2025, marginal no. 35a).
When gotakt can help
If your invoices come from a shop, a client portal or your own software, filing is part of the process: the XML produced must be stored unchanged, clearly named and retrievable. gotakt connects the e-invoice to such systems and checks every file produced with the KoSIT validator, as shown in the validation record. How filing and archive look is agreed separately; the tax requirements come from you or your tax adviser. The feasibility check costs €290 net and is credited if you place an order.
More about the offer under E-invoicing from shop and software. If the validator reports errors in incoming or your own invoices, the pages on XRechnung errors will help.
Frequently asked questions
How long do I have to keep e-invoices?
Eight years, for incoming and outgoing invoices alike (§ 14b para. 1 UStG, the German VAT Act; § 147 para. 3 AO, the German Fiscal Code). The period begins at the end of the calendar year in which the invoice was issued. An invoice from 2026 must therefore be kept at least until 31 December 2034.
Do ten years still apply to older invoices?
As a rule, no. The eight years apply to all documents whose old period had not yet expired on 31 December 2024 (Art. 97 § 19a para. 2 EGAO, § 27 para. 40 UStG). Different rules apply to banks, insurers and investment firms.
With ZUGFeRD, do I also have to keep the PDF?
Only if it contains additional or different details relevant for tax, for example booking notes or a qualified electronic signature (GoBD para. 119 and 131). Otherwise the structured part is enough. But never convert the file into an image format, because the XML data is lost in the process (GoBD para. 129).
Is it enough to print out e-invoices?
No. Invoices received electronically must be kept in that form and may not just be filed as printouts (GoBD para. 119).
Do I have to keep the email the invoice came with?
Not if the email only served as a means of transport and contains nothing else that must be kept (GoBD para. 121). If the email itself contains something business-related, for example an agreement, it must be kept.
Is a checksum (hash) mandatory?
No. The GoBD require immutability but leave open whether this is achieved through hardware, software or organisation (para. 110). A stored checksum is one of several ways to show later that a file is unchanged.
May I archive e-invoices in the cloud?
Yes, if the requirements for retention and data access are met. Invoices may be stored electronically in another EU member state if full online access is possible and the tax office knows the location (§ 14b para. 2 UStG). Outside the EU, approval under § 146 para. 2b AO is required.
Do small businesses have to archive e-invoices?
Yes. Small businesses (Kleinunternehmer) are entrepreneurs and must keep received and own invoices for eight years (§ 14b para. 1 UStG). They have had to be able to receive e-invoices since 1 January 2025.
What happens if the procedural documentation is missing?
If missing or insufficient procedural documentation does not impair traceability, there is, according to GoBD para. 155, no formal defect of material weight that could lead to the accounting being rejected. Conversely, it is the means by which you show traceability.
Do I have to keep the validator's report?
There is no obligation to do so. However, the BMF (Federal Ministry of Finance) considers it sensible to keep the validation report as evidence (BMF letter of 15 October 2025, marginal no. 35a).
Sources
- Umsatzsteuergesetz (UStG, German VAT Act), § 14b Retention of invoices
- UStG § 14, Issuing invoices. Para. 3, authenticity, integrity, legibility
- UStG § 27, Transitional provisions. Para. 40
- Abgabenordnung (AO, German Fiscal Code), § 147 Rules for the retention of documents
- AO § 146, Rules for bookkeeping. Para. 2a, 2b and 4
- Introductory Act to the Fiscal Code (EGAO), Art. 97 § 19a Retention periods
- Handelsgesetzbuch (HGB, German Commercial Code), § 257 Retention of documents
- Bundesministerium der Finanzen (Federal Ministry of Finance): questions and answers on the e-invoice. Question 13, as of 29 October 2026, retrieved on 21 November 2026
- BMF letter of 15 October 2024 on mandatory e-invoicing. BStBl I p. 1320, marginal no. 60 and 61
- BMF letter of 15 October 2025 with amendments to the VAT application decree. BStBl I p. 1806, marginal no. 35a and 60, section 14b.1 UStAE
- GoBD as amended on 14 July 2025, Official AO Handbook 2026, Annex 33. BMF letter of 28 November 2019, amended on 11 March 2024 and 14 July 2025
- BMF letter of 14 July 2025: GoBD, 2nd amendment. BStBl I p. 1502
- German Bundestag: Fourth Bureaucracy Relief Act passes the Bundestag. Retention period for accounting vouchers shortened from ten to eight years
As of 21 November 2026. Technical and general explanation, not tax advice.
Further reading
- Receiving and checking e-invoicesInbox, viewer, input tax deduction and faulty invoices.
- Mandatory e-invoicing: who, from when, with which exceptionsDeadlines 2027 and 2028, transitional rules and exceptions.
- XRechnung and ZUGFeRD comparedWhich formats are permitted and how they are structured.
- E-invoices in special casesInterim invoice, credit note, correction, small amounts, small businesses and abroad.
- Understanding and fixing XRechnung errorsError codes of the KoSIT validator with cause and solution.


