Compliance · · 7 min read

How Long to Keep Invoices in Spain: 4, 6 and 10 Years

How long Spanish businesses must keep invoices: four years for tax, six under the Commercial Code, ten in one case, the form to keep and storage abroad.

How long must invoices be kept in Spain?

Four years for tax, six years under the Commercial Code, and ten years where the Tax Agency may still check a loss or deduction carried forward. The invoicing regulation (Royal Decree 1619/2012, article 19.1) tells businesses and professionals to keep their invoices for the period set by the General Tax Law (Ley 58/2003), and the Commercial Code (Código de Comercio, article 30) adds six years for business records. Our reading is that a Spanish business should keep each invoice for the longest of the periods that applies to it. Which one that is, for a given invoice, is a question for the company's adviser.

The three numbers come from three different rules:

Period Source What it covers
4 years General Tax Law, article 66 and article 70.1 The Tax Agency's right to determine the tax debt. The formal duty to keep documents lasts while that right has not expired
6 years Commercial Code, article 30 Books, correspondence, documentation and vouchers of the business, from the last entry in the books
10 years General Tax Law, article 66 bis.2 and 70.3 The right to check bases, quotas or deductions that were carried forward or are still pending, and the duty to justify data from prescribed years in those cases
Three retention periods for Spanish invoices. Four years: the tax limitation period of the General Tax Law, counted from the day after the filing deadline of the return. Six years: the Commercial Code period for books, correspondence and vouchers, counted from the last entry in the books. Ten years: the period in which the Tax Agency can still check losses, credits and deductions that were carried forward.
Each period comes from a different rule. Our reading is to keep an invoice for the longest that applies to it.

This page covers how long, in what form and where. It leaves what an invoice contains to the invoice-requirements guide, and personal-data retention is outside it.

When does the four-year period start?

On the day after the deadline for filing the return that the invoice feeds. Article 67.1 of the General Tax Law counts the period for the Administration's right to assess the tax from the day after the regulatory deadline for the return or self-assessment. The period therefore ends later for an invoice booked in the last quarter of a year than for one booked in the first, and it differs by tax. VAT, corporate income tax and income tax have different filing dates, so an invoice that supports more than one of them is kept to the latest.

We have not set out the filing dates here. They sit in the tax rules for each return and change by taxpayer, so a worked date would be our guess rather than a source.

When do six and ten years apply?

Six years applies to the business records as a whole, and ten years to a narrow case. Article 30 of the Commercial Code obliges businesses to keep their books, correspondence, documentation and vouchers "debidamente ordenados" (properly ordered) for six years from the last entry in the books, unless general or special rules say otherwise. The duty continues after the business stops trading, and it falls on the heirs or the liquidators.

The ten-year case is in article 66 bis.2 of the General Tax Law. The four-year limitation does not stop the Tax Agency from starting a check of bases or quotas that were set off or are still waiting to be set off, or of deductions applied or pending. That right lapses after ten years from the day after the deadline for the return of the year in which the right arose. Article 70.3 keeps the duty to justify the underlying data in these cases. For a company carrying a tax loss forward, the invoices behind that loss are the ones this describes.

Article 70.2 adds a rule for records that serve other people's tax obligations: the retention period is the commercial one or the business's own formal-obligation period, whichever is longer. We read that as a further reason to use the longest period.

Which documents must be kept?

Invoices received, copies of invoices issued, and a short list of related documents. Article 19.1 of the Royal Decree lists:

  • received invoices;
  • copies or matrices of invoices issued under article 2.1 and 2.2;
  • the accounting vouchers that stand in for an invoice in the reverse-charge cases of article 97.Uno.4º of the VAT law;
  • the receipts of the special farm, forestry, livestock and fishing scheme, both the original (by the issuer) and the copy (by the holder);
  • import documents.

Article 19.2 requires them to be kept with their original content, in order, within the periods and under the conditions of the regulation. The duty applies as well to businesses under special VAT schemes. A VAT-liable person who is not a business keeps only the received invoices and the vouchers.

In what form must an invoice be kept?

In any form that guarantees authenticity of origin, integrity of content, legibility, and prompt access for the Tax Agency. Article 20 allows paper or electronic. For electronic invoices article 21 adds specific rules:

  • they must stay legible in the original format in which they were received or sent, together with any associated data and the means of verifying the signature or other authorised elements that prove origin and integrity;
  • the Tax Agency can require them at any time to be turned into readable language;
  • they must be managed so as to give online access to the data, remote download and use, without unjustified delay. "Full access" means the ability to view, search selectively, copy or download, and print.

For an invoice that arrived as a structured file, our reading is that the structured file is the one to keep, not only a rendered image of it. The same applies to e-invoices to the public sector, which the government's Facturae site says are kept like paper ones for the period of the General Tax Law. How to invoice the Spanish public sector through FACe describes that route.

Where may invoices be stored, and who may store them?

Anywhere, if the Tax Agency can reach them at once. Outside Spain, only electronically and with prior notice. Article 22 lets the business choose the place, on condition that it gives the inspecting office all the documents without unjustified delay. When storage is outside Spain, the duty is met only by electronic means giving online access, remote download and use. The business must tell the Tax Agency beforehand. Article 23 says the access duty applies whatever the place of storage.

A third party can do the keeping physically, acting in the business's name and on its behalf, and the business remains responsible for every obligation of the chapter (article 19.3). If that third party is not established in the EU, the arrangement is allowed only after notifying the Tax Agency, unless it is in the Canary Islands, Ceuta or Melilla, or in a country with a mutual-assistance instrument of the kind the article names (article 19.4). Our reading is that a cloud archive is a third party under these articles.

What does the e-invoice mandate change for storage?

We have not found a change, and this page does not claim one. Royal Decree 238/2026 makes a Tax Agency public solution a repository of electronic invoices, as our mandate guide describes. We have not read whether that alters a business's own retention duty. The consolidated invoicing regulation, read on 24 November 2026, still states articles 19 to 23 as above. The Verifactu rules, with their own record-keeping, are a separate regime: Is Verifactu postponed to 2028?

What should a finance team set up?

One retention rule in the archive, set to the longest applicable period, and a test that the Tax Agency could be given access. In order:

  1. Decide the period with your adviser: at least six years for business records, longer where losses or deductions are carried forward.
  2. Store received and issued invoices in the form they travelled in, with their signature or validation data.
  3. Check that you can search, copy and print them quickly, and that the place of storage, if abroad, has been notified.
  4. Match received credit notes to originals, as the corrective-invoice guide describes.

E-invoice receiving with GoRoute describes how we receive structured invoices over Peppol, and the developer documentation shows how to read them from an API. To go through your own archive, book a session, see the tutorials, or read E-invoicing in Spain.


Sources, all read on 24 November 2026: the consolidated Real Decreto 1619/2012 (BOE-A-2012-14696), articles 19 to 23; the consolidated Ley 58/2003, the General Tax Law, articles 29, 66, 66 bis, 67 and 70; the Código de Comercio, article 30; and the government's Facturae site. Choosing the longest period, keeping the structured file, and treating a cloud archive as a third party are our reading. This page describes the rules; it is not tax or legal advice. GoRoute operates certified Peppol Access Point POP000991.

Frequently asked questions

How long must invoices be kept in Spain?
For tax, for the period set by the General Tax Law (Ley 58/2003), which is four years from the day after the deadline for filing the relevant return. The Commercial Code requires books, correspondence, documentation and vouchers to be kept for six years from the last entry in the books. Where tax losses or deductions are carried forward, the Tax Agency can check them for ten years.
Which invoices must be kept?
Invoices received, copies of invoices issued, the accounting vouchers that replace an invoice in reverse-charge cases, farm-compensation receipts and import documents (article 19.1 of Royal Decree 1619/2012).
Is a PDF enough for an invoice received as XML?
The regulation requires electronic invoices to be kept readable in the original format in which they were received or sent, with the associated data and the means of verifying the signature. Our reading is that this means keeping the original structured file, with a readable copy alongside it if you want one.
Can invoices be stored outside Spain?
Yes, by electronic means only, with online access and remote download for the Tax Agency, and after telling the Tax Agency in advance (article 22.2).
Can a cloud or archiving provider keep them for us?
Yes. A third party can do the keeping, acting in the business's name and on its behalf, and the business stays responsible for the obligations. A provider outside the EU needs a prior notice to the Tax Agency unless it is in one of the listed exceptions (article 19.3 and 19.4).

Related posts

Building on Peppol?

GoRoute is a certified Peppol Access Point & SMP. Book a demo or read the docs to get started.

Book a demo Read the docs