# What is the NAF? Spain's social security number

URL: https://melso.ai/en/blog/what-is-naf-spain
Published: 2026-12-04 · Updated: 2026-12-04

What the NAF (affiliation number with Spanish social security) is, where to see yours, how to request it with form TA.1 or on Import@ss, how it differs from the NUSS and the DNI or NIE, and why a self-employed worker needs it to register.

## What is the NAF: the short answer

What is the NAF? It is the affiliation number with Spanish social security: the one that identifies you to the Tesorería when you start an activity that includes you in the system. For an affiliated person it matches the social security number (NUSS), it is single for life, and a self-employed worker needs it before registering in the RETA.

> [!RESUMEN]
> - NAF stands for número de afiliación (affiliation number). The Tesorería General de la Seguridad Social (TGSS) assigns it and, for an affiliated person, it is the same number as the NUSS.
> - It is single, lifelong and valid for all schemes: it does not change if you move from employee to self-employed.
> - You see it on Import@ss, inside your personal area or with the Certification of the Social Security Number, and also on previous payslips and contracts.
> - If you have none, it is requested with form TA.1, on Import@ss with Cl@ve, certificate, DNIe or SMS, or without them with a selfie and a photo of your DNI or NIE.
> - A self-employed worker needs it to register: the Seguridad Social asks for it among the data of the procedure and declares it mandatory before affiliating to a scheme.

The NAF is the piece that tends to be forgotten until registration day. This guide tells you what it is, how it differs from the NUSS and from your DNI or NIE, where to find it and how to request it if you do not have one. If you want the full procedure, see our guide to [registering as self-employed](/en/blog/register-as-self-employed-spain).

## What is the NAF and what is it for?

According to the [Seguridad Social affiliation page](https://www.seg-social.es/wps/portal/wss/internet/Trabajadores/Afiliacion/7332) (the Seguridad Social is the Spanish social security system), affiliation is the administrative act by which the TGSS recognises a person's inclusion in the system, the first time they carry out an activity that determines that inclusion. That person is identified with the affiliation number, the NAF.

Affiliation has four characteristics that explain almost everything else:

- **Mandatory** for anyone included in the system, with their contribution rights and obligations.
- **Single and general:** it is valid for all schemes, whether the General scheme or the self-employed one (RETA).
- **Lifelong:** it lasts the person's whole life in the system.
- **Exclusive:** each person has a single number.

In practice, the NAF is used for everything you do with the Seguridad Social. Your registration in a scheme is recorded with it. The Seguridad Social itself says the number is needed to access pensions, subsidies and benefits, and that the health system of your autonomous community uses it to register your health card.

## NAF, NUSS and DNI or NIE: how they differ

The three numbers come up in the same conversation and it helps not to mix them up. The [Seguridad Social](https://www.seg-social.es/wps/portal/wss/internet/InformacionUtil/44539/44084) also explains that the social security number becomes the affiliation number when you start working. And it sums it up like this: the TGSS assigns a social security number (NUSS) to each citizen to identify them in their dealings with it, and for affiliated people that number is the same as the affiliation number.

| Concept | What it is | Who issues it | When you have it |
| --- | --- | --- | --- |
| NUSS | Social security number, which identifies you in your dealings with the Tesorería | TGSS | From when it is assigned, even if you have not worked yet |
| NAF | Affiliation number; for an affiliated person it matches the NUSS | TGSS | From when you start an activity that includes you in the system |
| DNI or NIE | Identity document (DNI for Spaniards, NIE for foreigners) | The State | From when you get it; it is a different number |

Source: [Seguridad Social, affiliation](https://www.seg-social.es/wps/portal/wss/internet/Trabajadores/Afiliacion/7332), accessed on 4 December 2026.

![Comparison of three numbers: the NUSS is assigned by the Tesorería General de la Seguridad Social and identifies you to it; the NAF is also assigned by the Tesorería and matches the NUSS for affiliated people, and the DNI or NIE is the identity document issued by the State and is a different number.](https://storage.googleapis.com/albert-489117-melso-blog-media/diagrams/en/que-es-el-naf/1-compare-1f1628bd16.png?w=1600&h=914&m=1&mw=1080&mh=1410 "Source: Seguridad Social, affiliation of workers, December 2026.")

In short: if you are affiliated, NAF and NUSS are the same number with two names. Your DNI or NIE is something else: you need it to request the number, but it does not replace it. If you need to clear up the difference between your tax ID and your document, read [NIF and DNI: are they the same?](/en/blog/nif-dni-difference-nie-tie-spain).

## Where to find your NAF

If you have ever worked as an employee, or were covered by the Seguro Escolar (the school insurance), you most likely already have a number. These are the routes, from the most official to the quickest:

1. **Import@ss, personal area.** It is the Tesorería's portal. You log in with Cl@ve, an electronic certificate or DNIe, or by SMS if you have already given your phone to the Seguridad Social. There you can see your number.
2. **Certification of the Social Security Number.** It is an Import@ss service, in the section on working life and reports. It lets you check your number and download a PDF report that certifies it, according to its [certification page](https://portal.seg-social.gob.es/wps/portal/importass/importass/Categorias/Vida+laboral+e+informes/Informes+sobre+tu+situacion+laboral/Acreditacion_NUSS).
3. **Work documents.** A previous payslip or contract includes your affiliation number.
4. **Your working-life report**, if you work or have ever worked.

A useful detail: without an assigned number you cannot identify yourself on Import@ss by SMS. If that is your case, you need Cl@ve or a certificate, or to make the request with a selfie and a photo of the document that you will see below.

> [!CONSEJO]
> If you cannot find your number, do not request a new one blindly. Affiliation is single, and the Seguridad Social reminds you that you may have one assigned without remembering it, from a previous job or from the Seguro Escolar. Check first in your personal area on Import@ss.

## How to get a NAF if you do not have one

The request is made with form **TA.1**, the request for affiliation and social security number. The [Import@ss request page](https://portal.seg-social.gob.es/wps/portal/importass/importass/Categorias/Altas,+bajas+y+modificaciones/Altas+y+afiliacion+de+trabajadores/Solicitar+el+numero+de+la+Seguridad+Social) says you can request it at any time, that any citizen without one assigned can request it, and that you need your DNI or NIE, a mobile phone, an email and your usual address.

1. **Gather the data.** Your DNI or NIE, your mobile, your email and your usual address.
2. **Go to Request the Social Security Number on Import@ss.** You choose how to identify yourself: Cl@ve Permanente, Cl@ve Móvil, DNIe, electronic certificate or SMS.
3. **If you have none of those methods**, you choose the none option: you fill in your personal details, take a selfie and upload a photo of your identity document. The Seguridad Social warns that an electronic identification method speeds up the process.
4. **Send the request and keep the receipt.** When the number is assigned, check it in your personal area.

![Four steps to request the NAF if you do not have one: gather DNI or NIE, mobile, email and address; go to Request the Social Security Number on Import@ss and choose an identification method; if you have none, take a selfie and upload a photo of the document; send the request and check the number in the personal area.](https://storage.googleapis.com/albert-489117-melso-blog-media/diagrams/en/que-es-el-naf/2-steps-3a717fd9bb.png?w=1600&h=718&m=1&mw=1080&mh=1626 "Source: Seguridad Social, Import@ss, December 2026.")

The [affiliation page](https://www.seg-social.es/wps/portal/wss/internet/Trabajadores/Afiliacion/7332) adds two more routes. Anyone with a digital certificate can file the TA.1 online in the number-assignment service of the electronic office. And it can also be filed at the provincial office of the Tesorería, or one of its Administraciones, in the province where the self-employed worker has their establishment (or, for an employee, where the employer is based). If you need a certificate, you have the steps in [how to get a digital certificate in Spain](/en/blog/digital-certificate-spain).

How long the number takes to be assigned does not appear on the official pages consulted, so we do not give a time: request it with margin before the date you want to start.

## Why a self-employed worker needs the NAF to register

Registering as self-employed happens in two places that must go hand in hand: Hacienda, with the census registration, and the Seguridad Social, with affiliation and registration in the RETA. According to the [practical guide to self-employment](https://portal.seg-social.gob.es/wps/portal/importass/importass/Colectivos/Trabajo+Autonomo/guia), the data you need for registration include your NUSS or NAF, your DNI or NIE, the start date of the activity, your estimated monthly net income, the address of the professional activity, your contact details, the IAE and CNAE codes and an IBAN to direct-debit the fee. If you are a foreigner, also your NIE and your work and residence permit.

The underlying reason is on the affiliation page: the number is mandatory before the request for affiliation and registration in a scheme. And the same page says that self-employed workers who start an activity and are not yet affiliated must request it themselves.

The timing set by the Seguridad Social guide:

| What | When |
| --- | --- |
| Registration in the RETA | On the day you start or up to 60 days earlier |
| Registration with Hacienda | Must match the registration with the Seguridad Social: both, before or on the day of the start |
| If you have already started | It is still processed, but it is treated as filed late for all purposes |

Source: [practical guide to self-employment](https://portal.seg-social.gob.es/wps/portal/importass/importass/Colectivos/Trabajo+Autonomo/guia) and [registration as self-employed](https://portal.seg-social.gob.es/wps/portal/importass/importass/Categorias/Altas,+bajas+y+modificaciones/Altas+y+afiliacion+de+trabajadores/Alta_trabajo_autonomo), accessed on 4 December 2026.

In practice, the NAF is requested first. With it in hand, you fill in the RETA registration and your census registration with [modelo 036](/en/blog/modelo-036-spain). If you leave it for the last day and find you have no number, you delay the registration and risk it being processed late.

## NAF for employees and for the self-employed: who requests it

You do not always request it yourself. If you are going to work as an employee and have no number, the employer does it and must do it before you start. If you are going to be self-employed, you request it. And if nobody does, the Tesorería can affiliate you ex officio, for example after an action by the Labour Inspectorate, according to [article 16 of the General Social Security Law](https://www.boe.es/buscar/act.php?id=BOE-A-2015-11724); and if whoever should have requested it does not, you can ask directly for your affiliation yourself.

Since the number is single and lifelong, the same one serves you when you combine employment and self-employment, which is common if you come from a job as an employee. There is more on that situation in [being employed and self-employed in Spain](/en/blog/employed-and-self-employed-spain).

## Example: Irene requests her number before registering

Irene is a photographer in Zaragoza, is 24, has never worked as an employee and wants to start her activity on 1 February 2027. This is her calendar (illustrative example, with invented dates):

1. **7 December 2026.** She logs in to Import@ss with Cl@ve, checks in her personal area that she has no number assigned and sends the request with her DNI, mobile, email and address.
2. **When she receives the number.** She notes it down. It is her NAF and it will never change. Since it is the same as her NUSS, she can already identify herself by SMS if she gives her phone number.
3. **14 December 2026.** With the NAF, she gathers her IAE, her CNAE, her activity address and her IBAN, and files the registration in the RETA and with Hacienda. She does it before starting and with more than a month of margin: the Seguridad Social allows up to 60 days in advance.
4. **1 February 2027.** She starts her activity with both registrations already done.

If she had waited until 1 February to request the NAF, she would have started without being registered and her filing would have been treated as late.

![Irene requests her social security number on 7 December 2026, receives it later, registers in the RETA and with Hacienda on 14 December 2026 and starts her activity on 1 February 2027, with more than a month of margin against the maximum of 60 days in advance.](https://storage.googleapis.com/albert-489117-melso-blog-media/diagrams/en/que-es-el-naf/3-timeline-a4b9700967.png?w=1600&h=674&m=1&mw=1080&mh=1287 "Illustrative example. The response time for the number is not set on the official pages.")

> [!MELSO]
> What most often holds up a registration is gathering the data before the start date. With Melso you collect what the registration needs and a Melso gestor files your [registration as self-employed](/en/tramites/alta) with Hacienda and the Seguridad Social. If you have a question about your number, ask your team of gestores in the chat.

## Common mistakes with the NAF

- **Requesting a new number when you already have one.** Affiliation is single: check first in your personal area.
- **Confusing it with the DNI or NIE.** They are different numbers, and only the second is your document.
- **Leaving it for the last day of registration.** The NAF comes before the registration request, and the Seguridad Social allows processing the registration up to 60 days in advance.
- **Sharing it on unreliable websites.** It is a piece of your working life: use it only on the official portals.
- **Expecting SMS to work without a number.** Without a NUSS you cannot identify yourself by SMS; use Cl@ve or a certificate.
- **Assuming the employer does it.** Only in employment. As a self-employed worker, you request it.

## How Melso helps

Melso is your online gestoría, with an AI agent and human professionals behind it. On WhatsApp you send it receipts and invoices, Melso organises your income and expenses, spots what is missing and warns you about the tax calendar. If you are not registered yet, Melso collects what the registration needs and a Melso gestor files your [registration as self-employed](/en/tramites/alta) with Hacienda and the Seguridad Social. See the [pricing](/en/precios/autonomos), get started at [melso.ai](https://melso.ai) or tap **Chat on WhatsApp**.

> This article is for information only and does not replace professional advice for your case. Last reviewed: 4 December 2026.

## Frequently asked questions

### What does NAF mean?

NAF stands for número de afiliación, the affiliation number with the Seguridad Social, the Spanish social security system. It is the number the Tesorería General de la Seguridad Social uses to identify you once you are affiliated, that is, once you have started an activity that includes you in the system. For affiliated people it matches the social security number, the NUSS, and stays with you for your whole working life.

### Are the NAF and the NUSS the same number?

For an affiliated person, yes: according to the Seguridad Social, the social security number is the same as the affiliation number. The difference is the moment. With a NUSS you are identified in your dealings with the Tesorería, even if you have never worked; people speak of the NAF once you are affiliated, when you start an activity that includes you in some scheme.

### Where can I see my NAF?

On Import@ss, the Seguridad Social portal: inside your personal area or with the service Acreditación del Número de la Seguridad Social, which gives you a PDF report. It also appears on work documents, such as a previous payslip or contract. If you have never had one assigned, you will have to request it before affiliating to any scheme.

### How do I request the NAF if I do not have one?

With form TA.1, the request for a social security number. You can do it on Import@ss identifying yourself with Cl@ve, an electronic certificate, DNIe or SMS. If you have none of those methods, the website asks for your details, a selfie and a photo of your DNI or NIE. You also need a mobile phone, an email and your usual address.

### Does a self-employed worker need a NAF to register?

Yes. The Seguridad Social guide for self-employment lists your social security number (NUSS or NAF) among the data needed for registration, and the Seguridad Social itself says the number is mandatory before requesting affiliation and registration in a scheme. If you do not have one, it is requested from the service Solicitar el número de la Seguridad Social.

### How many NAF numbers can I have?

Just one. Affiliation is single for all schemes, exclusive and lifelong: it stays with you for your whole life in the system, even if you change jobs, move from employee to self-employed or combine both. That is why, before requesting a new one, you should check whether you already have one assigned, for example from a previous job or from the Seguro Escolar.

### Who requests the NAF, me or the employer?

It depends. If you are going to work as an employee, the employer requests the number before you start. If you are going to be self-employed, you request it: the Seguridad Social says that a self-employed worker who starts an activity and is not affiliated must request affiliation. The Tesorería can also assign it ex officio.

### How long does the NAF take to arrive?

The official pages consulted set no response time, so we cannot give you a figure. The prudent thing is to request it with margin: registration as self-employed can be processed up to 60 days before the start of the activity, so you can request the number weeks before the date you want to start.

### Is the NAF used for the health card?

Yes, indirectly. The health system of your autonomous community uses the social security number to register your health card. It is not the number on the card, but the data your right to care is linked to. If you have questions about the card, ask the health service of your community.

### Is the NAF the same as my DNI or NIE?

No. The DNI or NIE is your identity document and is issued by the State. The NAF is assigned by the Tesorería General de la Seguridad Social and is the one you use in your working life and with the Seguridad Social. You need your DNI or NIE to request it, but they are two different numbers and one cannot replace the other.

## Sources

- [Affiliation of workers](https://www.seg-social.es/wps/portal/wss/internet/Trabajadores/Afiliacion/7332), Seguridad Social, accessed 2026-12-04
- [Social security number: useful information](https://www.seg-social.es/wps/portal/wss/internet/InformacionUtil/44539/44084), Seguridad Social, accessed 2026-12-04
- [Royal Legislative Decree 8/2015, consolidated General Social Security Law (article 16)](https://www.boe.es/buscar/act.php?id=BOE-A-2015-11724), BOE, accessed 2026-12-04
- [Request the Social Security Number](https://portal.seg-social.gob.es/wps/portal/importass/importass/Categorias/Altas,+bajas+y+modificaciones/Altas+y+afiliacion+de+trabajadores/Solicitar+el+numero+de+la+Seguridad+Social), Seguridad Social (Import@ss), accessed 2026-12-04
- [Certification of the Social Security Number](https://portal.seg-social.gob.es/wps/portal/importass/importass/Categorias/Vida+laboral+e+informes/Informes+sobre+tu+situacion+laboral/Acreditacion_NUSS), Seguridad Social (Import@ss), accessed 2026-12-04
- [Practical guide to self-employment](https://portal.seg-social.gob.es/wps/portal/importass/importass/Colectivos/Trabajo+Autonomo/guia), Seguridad Social (Import@ss), accessed 2026-12-04
- [Registration as self-employed](https://portal.seg-social.gob.es/wps/portal/importass/importass/Categorias/Altas,+bajas+y+modificaciones/Altas+y+afiliacion+de+trabajadores/Alta_trabajo_autonomo), Seguridad Social (Import@ss), accessed 2026-12-04
