TL;DR: Changing your tax residency is legal, but it is not done with paperwork: it is done by moving your life. The Tax Agency looks at three things (art. 9 LIRPF): that you spend more than 183 days abroad, that your center of economic interests leaves Spain and —the most ignored one— where your partner and minor children live. If you fail even one, you still pay taxes here on your worldwide income even if you have a certificate from another country.
Changing tax residency is one of the most important decisions a Spanish entrepreneur or professional can make. Also one of the most misunderstood. Some believe that simply renting an apartment in another country is enough to stop paying taxes in Spain. Some fear it is illegal. The reality is in the middle: it is perfectly legal, but it has specific requirements that the Tax Agency verifies with increasing rigor.
In this guide I explain exactly how the process works, what criteria the Tax Agency applies, how long it takes to take effect, and which countries offer the most advantageous conditions for Spaniards.
What does changing tax residency mean?
Tax residency determines in which country you pay taxes on your worldwide income. If you are a tax resident in Spain, the Tax Agency taxes your global income — including dividends from foreign companies, rents in other countries or profits from an American LLC.
Changing tax residency means stopping being a tax resident in Spain and becoming one in another country. For practical purposes, it implies that you stop filing the Spanish IRPF and start paying taxes according to the rules of the new country of residence.
Do not confuse tax residency with:
- Municipal registration (Empadronamiento): it is a municipal procedure that does not determine tax residency.
- Legal residency or residence permit: these are immigration requirements, not tax ones.
- Nationality: you can change tax residency without renouncing Spanish nationality.
Criteria used by the Tax Agency to consider you a tax resident in Spain
The Personal Income Tax Law (Ley del IRPF) establishes three independent criteria. It is enough to meet one of them for the Tax Agency to consider you a tax resident in Spain.
1. The 183-day rule
If you stay in Spanish territory for more than 183 days during the calendar year, you are a tax resident. Days are counted cumulatively, not necessarily consecutively. Sporadic absences are not deducted unless you prove tax residency in another country.
2. Center of economic interests
If the main core of your activities or economic interests is in Spain, the Tax Agency can consider you a resident even if you spend less than 183 days here. This includes: having an active Spanish company, receiving income mainly from Spanish sources or having the majority of your assets in Spain.
3. Center of vital interests (the most ignored one)
It is presumed that you are a tax resident in Spain if your legally non-separated spouse or minor children habitually reside in Spain. This criterion catches many people who believed they had changed their residency. If your family remains in Spain while you live in Dubai, the Tax Agency can challenge your deregistration.
Steps to deregister as a tax resident in Spain
Step 1: Establish effective residency in the new country
Before communicating anything to the Tax Agency, you must have real residency in the destination country: rental agreement or property deed, residence permit (if applicable) and proof of stay. The more solid the documentation, the harder it is for the Tax Agency to challenge it.
Step 2: File Form 030
Form 030 is the communication of change of tax address. It is filed before the AEAT and is the formal procedure to communicate that you no longer reside in Spain. Filing Form 030 is not enough on its own — the Tax Agency can investigate whether the change is real during the following four years.
Step 3: Progressive decoupling from Spain
For the change to be credible to the Tax Agency, it is advisable to:
- Cancel the municipal registration (empadronamiento) in Spain
- Transfer or close bank accounts in Spain (or reduce them)
- Relocate the registered office of Spanish companies (if you have them)
- Transfer insurance, primary care doctor and administrative ties to the new country
Step 4: File the IRPF for the year of change
The year you change residency is especially complex. You pay taxes in Spain only for the days you were a resident, and in the new country for the rest of the year. That year's IRPF has specific rules that should be managed with an advisor.
Step 5: Four years of surveillance
If you change your residence to a tax haven (Spanish list of non-cooperative jurisdictions), the Spanish tax office (Hacienda) will continue to consider you a tax resident in Spain for an additional 4 years, regardless of where you live.
Most advantageous countries to change tax residence from Spain
Andorra
The geographically closest option. Andorra has a maximum personal income tax (IRPF) of 10% and does not tax dividends or capital gains from shareholdings. It requires an effective minimum residence of 90 days a year and proof of real economic ties to the country.
Maximum tax rate: 10% | Treaty with Spain: Yes (signed in 2015)
Dubai (United Arab Emirates)
Dubai has no personal income tax. Residence is obtained through a freelance visa, investor visa, or through a free zone company. Dubai is not on the Spanish list of tax havens since it signed a treaty with Spain.
Maximum tax rate: 0% | Treaty with Spain: Yes
Portugal — Current situation
The popular NHR regime ended for new applications in 2024. In 2025 Portugal launched the IFICI (successor to the NHR), more restrictive and aimed at skilled workers and entrepreneurs in specific sectors. For most Spaniards looking for pure tax advantages, Portugal is no longer the option it used to be.
Paraguay
Complete guide: tax residence in Paraguay for Spaniards — how territoriality works and why the lack of a tax treaty with Spain changes the rules.
Paraguay is gaining popularity among digital entrepreneurs. With no tax on income generated outside the country, residence obtainable in a few months, and a low cost of living. Attention: Paraguay has no tax treaty with Spain, which can create complications with the Spanish tax office's anti-abuse rules.
Most common mistakes detected by the Spanish tax office
- Believing that registering your address abroad (empadronamiento) is enough: local registration (empadronamiento) has no tax effect.
- Keeping your family in Spain: triggers the presumption of personal income tax (IRPF) residency.
- Continuing to invoice Spanish clients as a self-employed worker (autónomo): The Spanish tax office can argue that your economic activity remains in Spain.
- Failing to keep proof of presence: boarding passes, bank statements with local charges, utility bills — everything counts in an audit.
If you have doubts about your specific situation, consult with our team before starting the process. It is much easier to do it right from the beginning than to rectify it after an audit.
→ See tax residence comparison for Spaniards
→ International tax advisory services
Frequently asked questions about changing tax residence
Legal notice: this article is for informational purposes and does not constitute personalized tax advice. Every tax situation is different. Consult with a specialized tax advisor before making decisions.
💡 Related: special case in tax residences and public officials.
How to stop being a tax resident · The myth of the tax stateless person · CRS: automatic exchange
A specific destination: if you are considering staying in the EU, look at how taxes and tax residence work in Cyprus.
How much would you really save?
Before moving, look at the starting point: what you leave behind today with the Spanish tax office with your real profit.
Open the calculator →What if you don't need to leave? If you have been outside of Spain for more than 5 years and are thinking of returning, the Beckham Law lets you be taxed at a flat 24% for 6 years without worldwide income or model 720. It competes toe-to-toe with going abroad.









