Quick answer: if you are tax resident in Spain and physically work from Spain for a foreign company, your salary does not fall outside Spanish income tax simply because the employer is abroad. Spanish residents are taxed on worldwide income, and tax treaties place major importance on where employment is physically exercised.
The country on your employment contract, the currency of your salary and the bank account receiving it do not determine taxation on their own.
Three separate systems need to be coordinated:
- your Spanish income tax;
- social security;
- the Spanish obligations and permanent-establishment risk the arrangement may create for the foreign employer.
Índice
ToggleSpanish tax residence means worldwide-income taxation
The Spanish Tax Agency states that a Spanish tax resident is subject to Personal Income Tax on worldwide income, subject to any applicable double tax treaty.
So if you live in Valencia and work every day from home for a German, British or U.S. employer, the result does not change merely because your salary is paid abroad, denominated in another currency or deposited into a foreign bank account.
The first question is whether you are Spanish tax resident. If you are, your employment income enters the Spanish IRPF analysis.
The employer’s location is not the same as the place where employment is exercised
Tax treaties typically begin from a simple principle:
the residence state may tax employment income, while another state can also obtain taxing rights where the employment is physically exercised there.
This produces two different cases.
You live and work from Spain for a foreign employer
Where you are Spanish resident and physically perform the employment from Spain, Spain has the central connection to the work.
You live in Spain but physically work some days abroad
Spain continues to tax worldwide income as the residence state, while the other country may be entitled to tax salary attributable to workdays exercised there, depending on the treaty and its 183-day exception.
Spain then applies the relevant double-tax-relief mechanism where both states validly tax the same income.
The treaty’s 183-day employment rule is not the Spanish tax-residence rule
These are two different tests.
| Question | What is being tested |
|---|---|
| Am I Spanish tax resident? | Spanish residence rules: presence, economic interests and other applicable tests |
| Can another country tax workdays physically performed there? | The employment article of the relevant treaty and its possible 183-day exception |
A common treaty exception can reserve taxation to the residence state where all relevant conditions are met, typically including:
- no more than 183 days in the work state;
- remuneration not paid by or on behalf of an employer resident there;
- remuneration not borne by the employer’s permanent establishment there.
It does not mean that a Spanish resident working from Spain for a foreign company escapes Spanish income tax.
Example 1: U.S. employer, employee works entirely from Madrid
Assume:
- Spanish tax residence;
- employment contract with a California company;
- 100% remote work from Madrid;
- €120,000 salary;
- salary paid to a U.S. account.
From Spain’s perspective, the employee is Spanish resident, the work is physically performed in Spain and the salary forms part of worldwide taxable income.
Any U.S. withholding or taxation must be tested under U.S. rules and the Spain-U.S. treaty. Where foreign tax is validly imposed on income also taxed in Spain, the applicable double-tax-relief mechanism should be reviewed.
U.S. citizens need an additional U.S. analysis, because U.S. tax obligations can continue on a citizenship basis even after becoming Spanish resident.
Example 2: Spanish resident working part of the week in France
Assume the employee lives in Barcelona, has a French employer, teleworks three days from Spain and spends two days in the French office.
The analysis now requires:
- physical workdays in each country;
- the Spain-France treaty;
- whether France may tax French workdays;
- foreign withholding;
- Spanish double-tax relief;
- the applicable social-security legislation.
The social-security result does not necessarily mirror the income-tax result.
Social security: a foreign employer may need to register in Spain
Spanish Social Security expressly addresses employees hired by foreign companies to perform their activity in Spain.
Where Spanish social-security legislation applies, the foreign employer may need to:
- register as an employer;
- obtain a Spanish contribution-account code;
- register the employee;
- pay Spanish contributions;
- appoint a legal representative in Spain in relevant cases.
Spanish Social Security also provides a registration route for foreign companies with no Spanish workplace.
“We do not have a Spanish office” therefore does not automatically mean “we have no Spanish employer obligations”.
What if the employer temporarily posts you to Spain?
A genuine temporary posting can produce a different social-security result from permanent remote work.
Within the EU/EEA/Swiss coordination framework, a qualifying posted worker can sometimes remain temporarily insured in the home system, normally evidenced through an A1 certificate.
Outside that framework, a bilateral social-security agreement may be relevant.
Do not treat these situations as identical:
- a temporary employer-directed posting;
- an employee independently moving to Spain permanently;
- a person hired from the outset to work in Spain.
Cross-border telework in Europe: the 50% framework
Since 2023, a European Framework Agreement provides an important exception for qualifying habitual cross-border telework between participating states.
Upon application and subject to the conditions, the employee can remain within the social-security system of the employer’s state where telework in the residence state is less than 50% of total working time.
This is useful for some hybrid workers.
It is not a right to freely choose a social-security country, and it does not solve the classic case of someone working 100% remotely from Spain.
Does the foreign employer need to withhold Spanish income tax?
The employer’s exact Spanish tax footprint must be reviewed.
Spain’s Personal Income Tax Regulations include certain non-resident entities operating in Spain, even without a permanent establishment, among parties required to withhold on employment income they pay.
An international employment arrangement can therefore require Spanish tax/payroll setup in addition to social-security registration.
In other cases, a foreign payer may not deduct sufficient Spanish tax and the employee will settle the liability through the annual return.
No Spanish withholding on the payslip does not mean the salary is exempt.
Paid abroad but working from Spain?
Your payslip is only one piece. Residence, treaty treatment, withholding, social security and employer obligations need to fit together. If you recently moved to Spain specifically to work remotely, a special inbound tax regime may also need to be tested before defaulting to ordinary Spanish IRPF.
If you moved to Spain to work remotely, test the Beckham regime before defaulting to ordinary IRPF
Since 2023, Spain’s special inbound-taxpayer regime expressly accommodates certain remote employees.
The Spanish Tax Agency confirms that the employment-related relocation condition can be satisfied where the employment is performed remotely through the exclusive use of computer, telematic and telecommunications systems, even where the employer did not formally order the move.
Certain employees holding Spain’s international telework visa are specifically contemplated.
This means that someone who lived abroad, works for a foreign employer, relocates to Spain and becomes Spanish resident may need to compare ordinary IRPF with the Article 93 inbound regime before the election deadline expires.
Eligibility is not automatic. N30 Global’s Beckham Law advisory covers the eligibility and structural analysis.
Working from Spain for a foreign company does not by itself qualify for Spain’s Article 7.p exemption
The Article 7.p employment-income exemption requires, among other conditions, that the work is actually performed abroad.
Working from Málaga for a London company is not foreign work for this purpose.
The employer is foreign; the employee is still physically working in Spain.
Actual workdays abroad can require a separate Article 7.p analysis where all statutory requirements are satisfied.
Your Spanish home office can create a tax question for the foreign employer
Permanent remote work can also affect the company.
Depending on the treaty and facts, Spain may need to test whether the foreign employer has a permanent establishment.
Two common routes are:
Fixed place of business
The question can include whether the employee’s home or office is a sufficiently fixed business location that is genuinely at the disposal of the employer.
Dependent agent
Risk can also arise where the employee habitually exercises significant contractual authority or performs relevant sales functions under the specific treaty wording.
But:
an employee working from a Spanish home does not automatically create a permanent establishment.
In binding ruling V0066-22, Spain’s Directorate-General for Taxation examined a UK company whose employee worked from a Spanish home. On those specific facts, it found no permanent establishment, giving weight to factors including the employee’s unilateral decision to remain in Spain and the fact that the company neither required nor provided the Spanish home office.
The ruling also stresses that permanent establishment remains a facts-and-circumstances question.
When does employer risk become more significant?
Review becomes more important where the employee:
- works indefinitely from Spain;
- is a senior executive;
- performs a core business function;
- negotiates or concludes contracts;
- manages key customers;
- directs teams from Spain;
- uses premises paid for or required by the employer;
- effectively represents a permanent commercial presence in Spain.
Four common ways to structure a foreign employee working in Spain
| Model | When it can fit | Main review |
|---|---|---|
| Foreign employer registers in Spain | One or a few employees; no subsidiary needed | Social security, payroll, withholding and representation |
| Employer of Record | Employer wants outsourced local employment administration | Cost, contractual allocation and actual functions |
| Spanish subsidiary | Team or Spanish market presence is growing | Corporate tax, VAT, payroll, transfer pricing and substance |
| Independent contractor | Only where the relationship is genuinely independent | Avoid artificial reclassification of employment |
Can the employer simply ask you to become self-employed?
A foreign company can legitimately contract with a genuinely independent professional.
But changing the contract label does not by itself convert an employment relationship into an independent business relationship.
Where the factual relationship remains one of employment, reclassification can create labour, tax and social-security risks.
The tax system also changes entirely: business-income rules, invoicing, VAT, self-employment social security and advance payments can replace employment-income treatment.
Bonuses, stock options and RSUs need separate analysis
International employees often receive compensation beyond salary:
- annual bonuses;
- restricted shares;
- RSUs;
- stock options;
- employee share-purchase plans;
- deferred compensation.
Where the employee worked in several countries during the period to which the award relates, it may be necessary to analyse timing, relevant service period, workdays by jurisdiction, foreign withholding and treaty allocation.
An RSU granted by a U.S. company is not automatically U.S.-source income merely because the shares are American.
What if the employer already withholds tax abroad?
Foreign withholding does not prove that the foreign country is entitled to tax the entire salary.
The withholding may be correct, partially correct, limited by treaty, refundable or eligible for Spanish double-tax relief.
The correct analysis is not to automatically subtract every foreign withholding amount from Spanish tax. It is first necessary to determine which foreign tax was legally due.
Checklist for employees working from Spain for a foreign company
- Confirm your tax residence.
- Track where you physically work during the year.
- Review the treaty with the employer’s country.
- Check what tax is being withheld abroad and why.
- Determine whether the employer needs Spanish tax/payroll registration.
- Determine the applicable social-security system.
- For postings, verify A1 or bilateral-agreement documentation where relevant.
- For European hybrid telework, test the 50% Framework Agreement.
- If newly relocated to Spain, test Beckham eligibility before the deadline.
- Do not apply Article 7.p to days physically worked from Spain.
- Review bonus and equity compensation separately.
- Assess permanent-establishment risk for the employer.
Frequently asked questions
If I work for a foreign company from Spain, where do I pay tax?
If you are Spanish tax resident, Spain taxes worldwide income. The treaty with the employer’s country determines whether that other state may also tax any portion, particularly where work is physically performed there.
Does it matter that my salary is paid into a foreign bank account?
Not by itself. Spanish residents must report worldwide taxable income regardless of where salary is paid.
If my employer is American, is my salary taxed in the United States?
Not necessarily. U.S. rules, physical work location, the treaty and personal circumstances matter. U.S. citizens require an additional citizenship-based U.S. tax analysis.
Does my foreign employer need to pay Spanish social security?
Potentially yes where Spanish legislation applies. Spain expressly provides registration procedures for foreign companies, including companies with no Spanish workplace. Temporary posting or international coordination rules can change the answer.
Can I stay in my employer country’s social-security system while working from Spain?
Sometimes, under posting rules, European coordination or the cross-border telework Framework Agreement. It is not a free choice and depends on the facts, countries and working-time percentages.
Can I use Spain’s Article 7.p exemption because my employer is foreign?
Not merely because the employer is abroad. The exemption requires qualifying work to be physically performed outside Spain.
Can I use the Beckham regime while working remotely for a foreign company?
Potentially. Since 2023, certain remote employees relocating to Spain can qualify under Article 93 if all requirements are met.
Can my home office create a Spanish permanent establishment for my employer?
Not automatically. Permanence, whether the premises are at the employer’s disposal, the employee’s functions and contractual powers all matter. Spanish DGT doctrine requires a facts-and-circumstances analysis.
Can my employer simply make me an independent contractor?
A genuine independent relationship is possible, but relabelling an employment relationship does not change its substance. Tax, labour and social-security consequences should be reviewed before restructuring it.
Conclusion: your employer can be foreign while your tax position is fundamentally Spanish
Working from Spain for a foreign company is entirely possible.
What does not work is assuming the employer’s jurisdiction dictates the employee’s tax position.
If you live and work from Spain, start with tax residence, worldwide income, physical work location, treaty rules, withholding, social security and employer obligations.
Only then add the exceptions: temporary postings, hybrid work, the Beckham regime, workdays abroad, equity compensation and possible Spanish permanent-establishment exposure for the employer.
N30 Global’s International Tax Tailoring approach coordinates those pieces together. The objective is not merely to know where a payslip is declared; it is to make sure residence, employment contract, payroll, social security and international taxation all describe the same economic reality.
Official sources and references
- Spanish Tax Agency · Worldwide income of Spanish residents.
- Spanish Tax Agency · Treaty treatment of employment income.
- Spanish Personal Income Tax Law.
- Spanish Personal Income Tax Regulations.
- Spanish Social Security · Registration of foreign companies.
- Spanish Social Security · Employees of foreign companies working in Spain.
- Spanish Official Gazette · Framework Agreement on habitual cross-border telework.
- Spanish Tax Agency · Inbound taxpayer regime for remote workers.
- Spanish Tax Agency · Article 7.p foreign-work exemption.
- Spanish Directorate-General for Taxation · Binding ruling V0066-22.
This article provides general information. Tax and social-security treatment depends on residence, physical workdays, employer jurisdiction, treaty, applicable social-security system, employee functions and the employer’s actual Spanish footprint.


