CNAE code in Spain: what it is and how to find yours

Company formation12 min read
A white tray holding three dark stone cubes with a small purple cube raised above the middle one
Vivid Editorial Team

The Vivid editorial team writes about company formation, finance and self-employment, with practical guides on business accounts, taxes and funding for founders and the self-employed.

The CNAE code in brief:

  • What the CNAE is: the Clasificación Nacional de Actividades Económicas (National Classification of Economic Activities), a statistical classification that gives each activity a code.
  • What the code looks like: a letter for the section, then 2, 3 and 4 digits for the division, the group and the class.
  • Current version: the CNAE-2025, in force since 16 January 2025; the CNAE-2009 has not been repealed.
  • Where it is asked: when registering as self-employed with the Social Security and in the incorporation documents of a company, among other procedures.
  • How to find it: with the INE’s CodIA tool or with the Tax Agency’s activity search tool.

You fill in your registration as an autónomo (self-employed worker) and the form asks for a “CNAE code”. Or you are setting up your S.L. (a Spanish private limited company) and the activities of the company’s purpose have to be stated with their codes. These four digits turn up in quite a few procedures, and finding yours comes down to knowing where to look.

Each section rests on a law or an official source: what the code means, how it reads, what changes with the CNAE-2025 and which procedures use it. Then come the steps to find your code and what sets it apart from the IAE epígrafe (the activity heading of the business activity tax).

What the CNAE is

The CNAE is the system used to classify economic activities and give each one a code. Spain’s National Statistics Institute (INE) sums it up in one sentence: “The CNAE is a statistical classification of economic activities.” It is used to present information on companies’ activity in official statistics, and the current version is approved by Royal Decree 10/2025.

Its use no longer stays within statistics. The royal decree itself acknowledges that, although it is a classification of a statistical nature, “its use has been spreading to the administrative sphere”. According to the INE, various bodies use it for tax, social contribution or subsidy purposes, and they set the rules for that use. The Social Security, in its guide for the self-employed, describes it as “a numeric code assigned to each professional activity”. The acronym CNAE stands for Clasificación Nacional de Actividades Económicas, which is why Spanish speakers say both “el CNAE” and “la CNAE”.

How to read a CNAE code

To understand what a CNAE code is, it helps to look at it level by level. It goes from the general to the specific in four steps. According to the INE, the section is “the most general level, represented by a letter”; then come the division, with two digits, and the group, which adds a third. The class is “the most detailed level, with four digits”. The table uses computer programming as an example:

LevelHow it is writtenExample in the CNAE-2025How many, according to the INE (2009 / 2025)
SectionOne letterK: telecommunications, computer programming, consultancy, computing infrastructure and other information services21 / 22
DivisionTwo digits6288 / 87
GroupThree digits62.1272 / 287
ClassFour digits62.10: computer programming activities629 / 664

The example shows why the version matters. In the CNAE-2009, computer programming was class 62.01, within section J, “Information and communication”; in the CNAE-2025 it becomes 62.10, in the new section K. And when a company has several activities, statistics keep just one, the “main activity”, which broadly speaking is the one that adds the most value.

CNAE-2009 and CNAE-2025

The CNAE-2025 is the current version of the classification. It was approved by Royal Decree 10/2025, which came into force on 16 January 2025, the day after its publication in the BOE, Spain’s official gazette. It takes over from the CNAE-2009, approved by Royal Decree 475/2007, but does not repeal it: the text makes clear that it contains no repealing clauses, “in particular, with regard to the CNAE-2009”.

The change does not reach every procedure on the same day. In statistics, the CNAE-2025 applies to data with a reference date from 1 January 2025, and the INE is bringing it in in stages. For non-statistical purposes, the preamble of the royal decree provides for rules in each sector stating which version to use in each case. Before filling in a form check which version it asks for and, if needed, use the CNAE-2009 to CNAE-2025 correspondence tables published by the INE.

The CNAE-2025 dates: it is the version in force since 16 January 2025, and the one official statistics use for data from 1 January 2025. Those already in the records of the General Treasury of the Social Security as responsible for paying contributions had to report their CNAE-2025 code before 30 June 2025. The other State public-sector administrative records that hold the economic activity must be coded under the CNAE-2025, for statistical purposes, before 1 January 2027.

Where you are asked for the CNAE code

Although it was created for statistics, the CNAE code appears at several points in the life of an autónomo or a company. Law 14/2013, on support for entrepreneurs, states that in their dealings with public administrations they must identify their main activity “by reference to the economic activity code that best describes it”. These are the procedures in which a law or the Social Security expressly asks for it:

ProcedureWhat is statedSource
Registering as self-employed with the Social SecurityThe activity or its CNAE code; with several activities, the code of each oneSocial Security (Importass)
Change of activity of an autónomoThe new code, within 6 days of the changeSocial Security (Importass)
Incorporating a companyThe codes of the activities of the company’s purpose, in the registrable documents and in the first registration (for an S.L., in the Companies Register)Law 14/2013, art. 20
S.L. with a standardised deed (CIRCE)Activities from a list linked to the CNAE, with at least two digits; with several activities, the main one with fourOrder JUS/1840/2015, art. 3
The company’s annual accountsThe code of the single main activity of the financial yearLaw 14/2013, art. 20
Company with employeesThe economic activity under the CNAE-2025, which generally sets the contribution rate for workplace accidentsLGSS, additional provision 61

To register with the Social Security, the guide on Importass, the Social Security’s online portal, recommends having both the IAE code and the CNAE code at hand. An activity stated incorrectly at registration can be corrected within 10 days of the registration being processed.

The CNAE and workplace accident contributions

For companies with employees, the CNAE code has a direct effect on contributions. For workplace accidents and occupational diseases of the staff, the premium scale of the sixty-first additional provision of the General Social Security Law (LGSS) applies. That scale is organised by CNAE-2025 codes, and it also sets its own rates for some occupations in any activity, such as staff doing office work only. The General Treasury of the Social Security sets the rate “according to the economic activity declared by the company”, with the main activity as the reference.

From 1 January 2026, each company contributes according to the CNAE-2025 code it has reported to the General Treasury. Without that report, the highest of the rates matching its old CNAE-2009 code applies, and a later report takes effect from the following settlement period, with no retroactive effect. For a self-employed worker outside the sea workers’ scheme and the special agricultural system, the CNAE does not set this rate. From 1 January 2026, the contribution order applies 1.30% for occupational contingencies, a cover the law generally makes compulsory.

How to find your CNAE code

What is my company’s CNAE? You choose your CNAE code yourself, based on a description of what you do, and there are official tools for that. The INE does not issue certificates of activity codes or know the codes assigned to companies outside statistics, so the search starts from your own activity. These are the steps:

1
Describe your activity

Write in one sentence what you do and for whom, in concrete words: “custom software development” works better than “services”.

2
Try the INE’s CodIA

Enter that description in CodIA, the INE tool that suggests a list of possible codes; if you know your CNAE-2009 code, add it.

3
Cross-check with the IAE

In the activity search tool on the Tax Agency’s online office you can see the indicative correlation between your IAE epígrafe and the CNAE-2025.

4
Read the notes

Before deciding, read the CNAE-2025 explanatory notes and the INE’s correspondence tables, and pick the class that best describes your main activity.

There is no need to download a full CNAE list: the CNAE-2025 has 664 classes and searching by description is quicker. For a company already set up, the code usually appears in its registered documents, and the annual accounts identify the single main activity of the year by its code. If a doubt arises in the register about whether that code is correct, Law 14/2013 provides for the INE to resolve it, with the registrar referring the decision to it.

A chrome magnifying glass over a purple hexagon surrounded by six grey hexagons
Searching by a description of the activity leads to the right class without going through the whole list.

CNAE and IAE: how they differ

The difference between the CNAE and the IAE lies in what they are for. The CNAE classifies activities for statistical purposes. The Impuesto sobre Actividades Económicas (IAE, the business activity tax), by contrast, is a tax governed by the Local Finance Law, and its epígrafes classify activities for the purposes of that tax. The law asks for those epígrafes to be ordered “as far as possible” in line with the CNAE, but they are not the same code.

For your registration you will need both. There is a correspondence between CNAE and IAE, and the Social Security guide for registering as self-employed points to the Tax Agency’s search tool to look it up. That correspondence is indicative: the tool shows the CNAE codes that “as a guide” could correspond to each epígrafe, so the final choice is still yours.

Your activity and the Vivid business account

Once you are registered, the next practical step is to keep the activity’s money apart from your personal money. To apply for the Vivid business account you need a valid identity document and details about your business, such as its legal form, address and sector of activity. Depending on the legal form, the application may also include company documents, for example the articles of association or the list of shareholders.

If you work for yourself, the application for the freelancer account usually asks only for your DNI (Spanish national ID card), your tax identification number and proof of your activity. This is what Vivid Business includes:

Free opening and use for €0 per month with the Free Start or Standard plan.
Sub-accounts with their own IBAN, for example to set aside what you keep for taxes.
Invoicing on every Vivid Business plan, with nothing extra to pay.

From your activity to the account: you apply online, without visiting any branch, and each sub-account has its own IBAN to keep your business money in order.

Your activity’s money, in a separate account

A Spanish IBAN to get paid, sub-accounts with their own IBAN to set aside taxes and free opening: you apply for the Vivid business account online and, with the Free Start or Standard plan, use it for €0 per month.

Open a business account

Frequently asked questions

  • What is the CNAE?

    It is the Clasificación Nacional de Actividades Económicas, the statistical system that gives each economic activity a code. The current version is the CNAE-2025, approved by Royal Decree 10/2025.

  • Its original purpose is statistical: the INE uses it to present information on companies’ activity. Other bodies also use it for tax, contribution or subsidy purposes, for example when the self-employed register or in the accident premium scale of companies with employees.

  • The most detailed level, the class, has four digits, such as 62.10 for computer programming in the CNAE-2025. Above it are the group, with three digits, the division, with two, and the section, which is identified by a letter.

  • It is the version of the classification approved by Royal Decree 10/2025, in force since 16 January 2025. According to the INE, it has 22 sections, 87 divisions, 287 groups and 664 classes, against 21, 88, 272 and 629 in the CNAE-2009.

  • The code is stated in specific procedures: registering as self-employed with the Social Security, a company’s incorporation documents and its annual accounts, among others. In each of them, you state the code yourself when completing the procedure.

  • If the company is already set up, the code usually appears in its registered documents and in the annual accounts, which identify the main activity by its code. To choose a new one, you can use the INE’s CodIA tool or the Tax Agency’s activity search tool.

  • In 2026, the occupational contingencies contribution of the self-employed, outside the sea workers’ scheme and the special agricultural system, is 1.30% whatever their CNAE. For companies with employees, the code does generally set the accident rate; some occupations, such as office-only staff, have their own rate.

  • Yes. When you register as self-employed, the Social Security asks for the code of each activity you plan to carry out. In a company’s annual accounts, by contrast, a single main activity appears per financial year.

  • No. The INE states that it does not issue certificates of activity codes and that it does not know the codes assigned to companies outside the statistical sphere.

This article provides general information and does not constitute legal, tax or Social Security advice. The information comes from Royal Decree 10/2025, Royal Decree 475/2007, Spain’s National Statistics Institute, the Social Security, the General Social Security Law and Law 14/2013, and may change. Vivid Money S.A. is an e-money institution authorised by the CSSF (Luxembourg); its branch in Spain is registered with the Banco de España under number 6731.

Other articles