NIE vs. Social Security Number in Spain: Do You Need Both?
Your NIE and your Spanish Social Security number are two different numbers. Learn what each one is for, when you need both and how to apply for your Social Security number with an NIE.

If you are moving to Spain to work, you will quickly come across two numbers: your NIE and your Social Security number. They are often confused, but they are issued by different authorities and serve different purposes.
In this guide, we explain the difference, when you need each number and how to get your Social Security number once you have an NIE.
1. What Is the NIE?
The NIE (Número de Identidad de Extranjero) is your personal identification number as a foreigner in Spain. It is assigned by the National Police and is used for tax, legal and administrative procedures, such as buying property, opening a bank account or signing contracts. See How to Get an NIE Number in Spain.
2. What Is the Social Security Number?
The Social Security number (Número de la Seguridad Social, or NUSS) is the number the Spanish Social Security system uses to identify you. It is also called the Número de Afiliación (NAF). It is a 12-digit number that you keep for life.
You need it to:
Be registered by an employer when you start a job.
Register as self-employed (autónomo).
Access public healthcare as a worker. See Healthcare in Spain for Expats.
Build up your contribution record for pensions and benefits.
3. Do You Need Both?
If you plan to work in Spain, as an employee or as self-employed, the answer is usually yes. You normally need your NIE first, because the Social Security number is linked to your identity document.
If you only need a Spanish number to buy property or invest, without working in Spain, you usually only need the NIE. See Do You Need an NIE Number to Buy Property in Spain?.
4. How to Get Your Social Security Number
Online through Import@ss
The usual route is the Social Security portal Import@ss. You apply through the service Solicitar el Número de la Seguridad Social. You need your identity details (NIE), contact details and your usual address. Depending on the route, you identify yourself with Cl@ve, a digital certificate or a photo verification process.
In person
You can also apply at an office of the General Treasury of Social Security (TGSS) with the TA.1 form and your identity document. Most offices require an appointment.
Through your employer
If you start a job and do not have a number yet, your employer can often request it when registering you.
5. The Right Order for New Arrivals
Get your NIE, and if applicable your residence document or TIE.
Register your address at the town hall. See Empadronamiento in Spain.
Apply for your Social Security number.
Start work, or register as self-employed. See Becoming Autónomo in Spain.
If you are applying for the Beckham Law, your Social Security registration date matters, because the application deadline is linked to it. Read Beckham Law Spain: 6-Month Application Deadline Explained.
6. Frequently Asked Questions
Is my Social Security number the same as my NIE?
No. They are two different numbers issued by different authorities. Your NIE starts with a letter, while your Social Security number is a 12-digit number.
Does my Social Security number expire?
No. You keep the same number for life, even if you leave Spain and come back.
Can I use my Social Security number from another EU country?
No. Each country has its own system. You need a Spanish Social Security number to work in Spain, although contributions in other EU countries can count towards certain benefits.
Need Help With Your NIE?
Spain Expat Consulting offers English-speaking NIE assistance for international clients, including preparation of your paperwork and help arranging an appointment in your preferred Spanish region, subject to availability.
Explore our NIE Number Spain assistance
This article is general information only and not individual legal or tax advice. Requirements and procedures can change and may vary by region or office, so always check the latest official guidance.
Need help applying this information to your circumstances? Speak with Spain Expat Consulting about the assistance available for your next steps.