Working from Spain for a foreign company has become increasingly common as remote and hybrid working continue to reshape the global workplace. While this flexibility offers significant opportunities, it may also create tax, employment and Social Security obligations that should be assessed before relocating or accepting a remote position.
Where will you pay taxes? Does it matter where your employer is based? Can a foreign company have legal obligations in Spain?
In this guide, we answer the most common questions to help you understand the Spanish legal framework, avoid costly mistakes and ensure your employment arrangement is fully compliant.

Can You Work from Spain for a Foreign Company?
The short answer is yes. Thanks to remote and hybrid working models, an increasing number of professionals now live in Spain while working for employers based abroad.
However, the fact that your employer is located in another country does not automatically exempt you from Spanish legislation. Depending on your circumstances, both you and your employer may have tax, employment and Social Security obligations in Spain.
To determine which rules apply, it is important to assess factors such as:
- Your country of tax residence.
- The amount of time you spend in Spain.
- Where your work is physically carried out.
- The country where your employer is established.
- Whether a Double Taxation Agreement (DTA) applies.
- The Social Security legislation applicable to your situation.
Spending a few weeks working remotely from Spain is very different from relocating permanently. Likewise, the legal implications may differ depending on whether you are employed by a foreign company or provide services as a self-employed professional.
For this reason, anyone planning to work from Spain for a foreign employer should assess their personal circumstances in advance to avoid unexpected tax or employment obligations.
If you are also considering expanding your business into Spain, you may find our article on corporate structure useful, where we explain when it may be the right time to review your company’s legal structure to support future growth.
Where Do You Pay Tax When Working from Spain?
One of the most common questions about working from Spain is where you will be required to pay income tax when employed by a foreign company.
As a general rule, if you are considered a Spanish tax resident, you will be subject to tax in Spain on your worldwide income, regardless of where your employer is located or where your salary is paid.
However, this does not necessarily mean that you will pay tax twice. Spain has signed Double Taxation Agreements (DTAs) with many countries to determine which country has taxing rights over specific types of income and to prevent double taxation.
The applicable rules will depend on the country involved and on your personal circumstances. For this reason, it is always advisable to review the relevant Double Taxation Agreement before assuming where your employment income should be taxed.
Understanding these rules is essential for anyone working from Spain, as your tax obligations may differ depending on your personal circumstances and the country where your employer is established.
Practical Example
Imagine you are a Spanish tax resident and work remotely from Barcelona for a company based in France.
Although your salary is paid by a French employer, you will generally be required to declare your employment income in Spain. If France also has taxing rights over part of that income, the Double Taxation Agreement between Spain and France will determine how double taxation is avoided.
In some situations, it may also be necessary to review how payroll tax has been withheld to prevent unexpected tax liabilities when filing your Spanish Income Tax Return.
However, taxation is only one part of the equation. Working remotely from Spain may also have Social Security implications, particularly where the arrangement is temporary or the employer has no legal presence in Spain.
What About Social Security?
In addition to tax obligations, working from Spain for a foreign company may also have important Social Security implications.
As a general rule, Social Security contributions are paid in the country where the work is habitually carried out. Therefore, if you normally work from Spain for a foreign employer — including under a remote working arrangement — you will generally be subject to the Spanish Social Security system, even if your employment contract is governed by the laws of another country or your salary is paid from abroad.
However, different rules may apply in certain situations. For example, special provisions exist for temporary assignments, as well as under the European Union Social Security Coordination Regulations and the bilateral Social Security agreements that Spain has signed with several non-EU countries.
As the applicable legislation depends on the specific circumstances of each case, it is essential to assess your situation carefully before starting to work from Spain.
What Obligations Can a Foreign Employer Have in Spain?
Where an employee is required to contribute to the Spanish Social Security system, the foreign employer may also have legal obligations under Spanish legislation.
Depending on the circumstances, these obligations may include:
- Registering with the Spanish General Treasury of the Social Security (Tesorería General de la Seguridad Social – TGSS).
- Obtaining a Social Security Contribution Account Code (Código de Cuenta de Cotización – CCC) as a non-resident employer.
- Registering the employee with the Spanish Social Security system.
- Paying the corresponding monthly Social Security contributions.
- Appointing a collaborating Mutua (occupational accident insurance provider) and complying with any other applicable employment and Social Security obligations.
Failure to comply with these requirements may result in administrative penalties, financial liabilities and potential issues affecting the employee’s Social Security coverage and benefits.
Before entering into an employment relationship with a foreign employer, it is advisable to review both the employee’s and the employer’s obligations under Spanish legislation. Proper planning from the outset can help prevent unexpected tax and employment issues while ensuring full compliance with Spanish law.
If you would like tailored advice based on your specific circumstances, our international tax and employment specialists are here to help.
Common Mistakes to Avoid
Working remotely from Spain for a foreign employer offers many professional opportunities. However, overlooking certain legal and tax considerations can lead to unnecessary complications. These are some of the most common mistakes:
1. Assuming that only your employer’s location matters
Many people believe that, because their employer is based abroad, only the laws of that country apply. In reality, your tax residency, the place where you perform your work and the applicable Social Security rules are often the key factors in determining your legal obligations.
2. Failing to assess your tax residency before relocating
Moving to Spain or deciding to work remotely from Spain may change your tax residency status, sometimes without you even realising it. Reviewing your position before relocating can help prevent unexpected tax liabilities and potential double taxation issues.
3. Overlooking Social Security obligations
Tax is only one part of the picture. It is equally important to determine where Social Security contributions should be paid, particularly where a foreign employer or a temporary assignment is involved.
4. Ignoring applicable international agreements
Spain has signed numerous Double Taxation Agreements (DTAs) and bilateral Social Security agreements with other countries. Failing to consider these agreements may result in unnecessary obligations or missed opportunities to optimise your position.
5. Seeking professional advice too late
Many tax and employment issues can be avoided through proper planning. Reviewing your situation before working from Spain for a foreign employer will help identify potential obligations early and provide greater legal certainty from the outset.
Frequently Asked Questions
Yes. You can legally work from Spain for a company based abroad. However, depending on your circumstances, this may create tax, employment and Social Security obligations in Spain. It is advisable to assess your situation before relocating or starting a remote working arrangement.
In many cases, yes. If you are considered a Spanish tax resident, you will generally be required to declare your worldwide income in Spain, regardless of where your employer is established. The applicable Double Taxation Agreement (DTA) will determine whether another country also has taxing rights and how double taxation is avoided.
As a general rule, individuals who habitually work from Spain are required to contribute to the Spanish Social Security system. However, different rules may apply in cases involving temporary assignments, European Union coordination rules or bilateral Social Security agreements.
Yes. However, depending on the circumstances, the employer may also have legal obligations in Spain, including registering with the Spanish Social Security authorities, enrolling the employee and complying with Spanish employment and Social Security regulations.
Spain has signed Double Taxation Agreements with many countries to prevent the same income from being taxed twice. These agreements establish which country has primary taxing rights and how any double taxation should be relieved.
Yes. Every situation is different, and the applicable tax and employment rules depend on several factors, including your tax residency, your employer’s location, the duration of your stay in Spain and the relevant international agreements. Obtaining professional advice before relocating or starting a remote role can help avoid unexpected liabilities and ensure compliance from the outset.
Conclusion
Working from Spain for a foreign company offers significant professional opportunities, but it also requires careful consideration of the tax, employment and Social Security obligations that may arise for both the employee and the employer.
Every situation is different and depends on factors such as tax residency, the employer’s country of establishment, the applicable legislation and any relevant international agreements. Understanding these issues before you relocate or begin working remotely can help prevent costly mistakes and provide greater legal certainty.
If you are planning to work from Spain for a foreign employer or would like to assess your specific circumstances, our team at Global Mind Advisors is here to help you navigate the legal and tax implications with confidence.
