The tax reference number is one of the most practical and quickest ways to access the Tax Agency’s Renta services. With it you can consult your tax details, generate your draft tax return or file your tax return via Renta WEB. In this article we explain step by step how to obtain the reference number in 2025, what information you need and what to do if you cannot obtain it in this way.
What Is the Tax Reference Number?
The tax reference number (número de referencia) is a 6-character code issued by the Spanish Tax Agency (Agencia Tributaria). It allows taxpayers to identify themselves online and access services like Renta WEB — the digital platform to prepare and file your income tax return.
If you don’t have a digital certificate or aren’t registered with Cl@ve, the tax reference number is your best option for:
- Accessing your personal tax file
- Reviewing or editing your tax return draft
- Submitting your return (individual or joint)
- Checking the status of a refund
- Downloading income tax certificates
How to Obtain Your Tax Reference Number (Step-by-Step)
To get your tax reference number, go to the Spanish Tax Agency’s official website and find the section “Obtain your reference number” (RENØ service).
Step 1: Identification
Enter your DNI (Spanish ID) or NIE (foreigner ID). The system will detect whether you can proceed with Cl@ve, reference number, or digital certificate.
Step 2: Provide Additional Information
Based on your ID type, you’ll need to input:
- DNI: expiry or issue date
- NIE: support number on your ID document
- Special IDs (K, L, M types): your date of birth
Step 3: Enter Box 505 From Your Last Tax Return
This box represents your “taxable base” (base liquidable general sometida a gravamen) from the previous tax year (in this case, the 2023 return filed in 2024). Enter the number exactly — no euro signs, no commas as thousands separators, only a period for decimals.
Didn’t file a return last year?
You’ll be asked to enter the last 5 digits of your IBAN from any bank account you held in 2023 instead.
Step 4: Generate and Save Your Reference Code
Click “Obtain reference” to get your code. You can copy it or write it down. Only the latest generated code will be valid — previous ones will be revoked.
Important Notes About the Tax Reference Number
- You can generate up to 10 reference codes per day. Only the last one is valid.
- Codes generated via browser and app are not interchangeable — a new one cancels the old.
- For joint returns, your spouse must also generate a reference number or log in via Cl@ve.
Once you have your code, you can log in to Renta WEB and file your return, make corrections, download tax records, or check refund progress.
What If You Can’t Get the Tax Reference Number?
If you’re unable to obtain the tax reference number, consider these alternatives:
- Cl@ve PIN: Requires prior registration; useful for frequent users.
- Digital certificate or electronic DNI: Offers full access to all services.
- Phone or in-person support: Available in special cases via Agencia Tributaria offices.
You can also check the official Cl@ve website to register or recover your access credentials.
FAQs About the Tax Reference Number
Can I get the reference number without filing a return last year?
Yes. You’ll need to provide the last 5 digits of your IBAN from 2023.
Where can I find Box 505 from my previous return?
It’s in your PDF copy, refund notice, or payment receipt. Look for the box labelled “Base liquidable general sometida a gravamen”.
What if I enter the wrong amount in Box 505?
The system won’t let you continue. Make sure the number is exact — with a decimal point and no currency symbols.
Getting your tax reference number is one of the easiest ways to access the Spanish tax system online. It gives you independence to file your taxes securely from home, without needing digital certificates or in-person appointments.
If you need personalised assistance to obtain your tax reference number or file your 2025 return, Entre Trámites offers expert support for expats and foreigners. We’ll guide you every step of the way from generating your code to submitting your return. You can also contact us directly through this contact Form for us to call you, or if you prefer, you can schedule a free consultation or write to us on WhatsApp.