Gestoría guides

Remote working from Spain for a foreign company

Last updated 14 October 2026 · Reviewed by Jaime Piñeira Pardo, lawyer registered with the ICAM bar, no. 138826 · English version of our Spanish guide.

The short answer

Digital nomad, taxes and Seguridad Social (Spanish social security): if you live in Spain, work remotely for a foreign company and are a tax resident here, you pay taxes in Spain on your worldwide income and contribute here unless a specific exception applies. Your company does not need to open a subsidiary: it registers as an employer without an establishment. The critical deadline is form 149 for the inbound expatriate regime, 6 months from the activity start date shown on your Seguridad Social registration. Managora prepares and submits it for you.

We handle the whole procedure for you, from start to finish.

You describe your case in a chat and sign; we file it with the Spanish authorities. Fixed price from €180.00 (21% VAT included), plus the tasa (official fee) where there is one.

See the procedure

What is new, and the law that applies

  • Ley 28/2022 (the Spanish Startups Act) of 21 December, on the promotion of the emerging companies ecosystem, in force since 1 January 2023: it reduced the previous years without tax residency in Spain to 5, opened the inbound expatriate regime to the employee who provides their work remotely with exclusively telematics means and allowed the spouse and children under 25 years of age to opt in.
  • Orden HFP/1338/2023 of 13 December (BOE of 15 December 2023): it approved forms 149 and 151 used today and established their electronic submission.
  • European Framework Agreement on habitual cross-border telework, applicable since 1 July 2023: among the States that have signed it, it allows maintaining the contribution in the company's country when teleworking from the country of residence remains below 50% of working time, provided it is requested, with agreements of up to 3 renewable years.
  • Ley 14/2013 (the Spanish Entrepreneurs Act), with the international remote work chapter added by the startups law: it is the basis for the visa of up to 1 year and the residence authorisation of up to 3 years resolved by the UGE-CE in 20 working days, with positive silence. The 20% limit for those who are self-employed is measured on their total professional activity (article 74 bis), not on the number of clients.
  • Autónomos contribution based on real income: in 2026 the same general and reduced tables of 2025 apply (Real Decreto-ley 3/2026), so the contribution depends on the bracket in which your expected net yield falls, not on a fixed fee.

Am I a tax resident in Spain if I work remotely here for a foreign company?

Tax residency is not decided by your contract or your nationality: it is decided by where you are. You are a resident if you stay more than 183 days of the calendar year in Spanish territory, counting sporadic absences, or if the main core or base of your activities or economic interests is located in Spain. Furthermore, if your legally non-separated spouse and minor children live here, Hacienda (the Spanish tax agency) presumes that you also reside here, unless proven otherwise.

Spain does not split the tax year. If you cross the threshold, you are a resident for the 12 months, including those you lived abroad. And a resident pays taxes on their worldwide income, including the salary paid by a company that has neither an office nor a tax identification number in Spain.

The double taxation agreement does not change that result. In the agreements followed by Spain, the salary for work physically performed in Spanish territory is taxed in Spain, even if the payer is abroad. Usually, the company's country stops withholding as soon as you provide them with your Spanish tax residency certificate: if they have already withheld taxes, the refund is requested there, not here. Managora obtains that certificate for you and prepares the communication to your employer.

Can a foreign company hire me without opening a subsidiary in Spain?

Yes, and it is the cleanest route. A company with no headquarters or branch here can register with the Spanish Seguridad Social as an employer without an establishment, obtain its contribution account code and register you in the general regime. There is no need to incorporate a company or register a branch in the commercial register. What is required is that the company first obtains a non-resident tax identification number from the tax agency and, if the registration and enrolment are processed by a representative in Spain, grants a power of attorney: this power usually requires a notario (notary public) from the company's country or a consular notary and, in many cases, an apostille and a sworn translation. Managora tells you exactly what power of attorney is needed and prepares it for you.

There remains the part that generates the most resistance in the company: paying contributions every month from abroad. The European social security regulation (article 21.2 of Regulation 987/2009, since 21.1 imposes the general obligation on the employer) allows a written agreement by which you assume compliance with that obligation, covering both employer and employee contributions, and the company pays them to you along with your payroll. The company remains responsible if you do not pay, but it no longer has to operate with the Tesorería (the social security treasury) month by month. This is the argument that usually unblocks a refusal from human resources.

The other 2 routes are an employer of record, which hires you here and invoices your company, and invoicing yourself as an autónomo (freelancer). The third seems the cheapest and is the one that causes the most problems: if you work exclusively for a single payer, with their schedule, their means and their instructions, the labour inspectorate can classify you as a false freelancer and claim the contributions for the entire period with a surcharge, in addition to the penalty. You can see the updated amount in the Registration as an autónomo file if that is your route.

Where do I pay social security contributions, in Spain or in the company's country?

The European rule is that you contribute where you work. If you type from your home in Valencia, your work is performed in Spain and the competent social security is the Spanish one, even if your boss, your payroll and your clients are abroad.

There are 2 exceptions worth knowing. The first appears when, in addition to working remotely from Spain, you regularly go to the company's headquarters: then you work in 2 States and the applicable law is decided by percentages. The general criterion is that performing a substantial part of the activity in Spain, which is your country of residence (indicatively, 25% of working time or remuneration), attracts all the contribution to Spain.

The second is the European Framework Agreement on habitual cross-border telework, applicable since 1 July 2023: it allows you to request to continue contributing in the company's country when teleworking from your country of residence remains below 50% of working time. It only works if both States have signed it, it is not applied automatically (it must be requested) and it is documented with an A1 certificate for a maximum of 3 renewable years. Checking if your country is among the signatories is the first step, because your entire contribution bill depends on it.

Outside the European Union, the European Economic Area and Switzerland, the bilateral social security agreement that Spain has signed with that country, if any, dictates the rules. Without an agreement, contributing in Spain is the only way out. And when the applicable legislation is Spanish and you travel to the company's headquarters, the paperwork that prevents them from claiming contributions there depends on the destination: the A1 certificate is only issued within the European regulations (European Union, European Economic Area and Switzerland, and the United Kingdom under the Withdrawal Agreement), while for a country with a bilateral agreement or with the Ibero-American Multilateral Agreement, the specific form for that agreement is issued. We process it in the A1 Posting Certificate file.

Can I apply for the inbound expatriate regime while working remotely from Spain?

Yes, if you have just arrived. The special regime for posted workers, known as the Beckham law, allows you to pay tax at 24% on the first €600,000 of your taxable base, salary included, and at 47% on the excess, instead of applying the general progressive scale (dividends, interest and capital gains from the sale of assets follow their own scale which, since 2025, reaches 30%). It does not necessarily last from the year of relocation: it applies the first calendar year in which, having already relocated, you spend more than 183 days in Spain and the following 5 years. If you arrive so late that you do not have more than 183 days left that year, the first year of the regime will be the following one, and the relocation must have taken place that first year or the previous one.

Since the 2022 startups law, the salaried remote worker is expressly included: anyone who moves their residence to Spain and, without being ordered by the employer, provides their work remotely through the exclusive use of computer, telematics and telecommunication means. The law does not require the company to be foreign, but it does require an employment relationship: anyone who invoices as an autónomo does not enter through this route. Hacienda will ask you for a document from the employer acknowledging the employment relationship, the activity start date shown on your Spanish Seguridad Social registration (or on the documentation allowing you to maintain your home social security) and the estimated duration of the work in Spain.

The 2 requirements that strike down the most applications are not having been a tax resident in Spain in the previous 5 tax periods and not obtaining income through a permanent establishment in Spain. And a warning about the 24%: it is the rate for the common territory. The Basque Country and Navarre have their own income tax and their own rules for posted workers, so that figure is not valid if you pay taxes in a chartered territory.

The regime does not apply automatically: you opt in with form 149 within the 6 months following the activity start date shown on your Seguridad Social registration in Spain and, from then on, you declare every year with form 151 instead of the ordinary tax return. In exchange, the tax liability is calculated using the non-resident tax rules and is only reduced by the deductions listed in the regulations, not by those of the ordinary tax return, so on moderate salaries you could lose out. We compare the 2 tax liabilities before submitting anything: you can see the updated amount in the Beckham Law file.

What if I work remotely from Spain as an autónomo for foreign clients?

Then there is no company to register you: you register yourself, with Hacienda using form 036 and in the RETA (special regime for self-employed workers), on the same day you start or up to 60 days before, requesting the flat rate in that same registration if you are eligible. What you invoice to a company in another country, within or outside the European Union, generally does not carry Spanish VAT; if that company is from the European Union, you also need to register in the intra-community operators register and declare those operations on form 349. An individual in the European Union is generally invoiced with Spanish VAT.

If you are a tax resident, you pay personal income tax (IRPF) on the yield of your entire activity, including what you earn from abroad, and the inbound expatriate regime does not work for you via the remote work route, which requires being an employee: you would only qualify with an entrepreneurial activity with a favourable report from ENISA or as a highly qualified professional providing services to an emerging company or dedicated to training, research, development or innovation. The detail, invoice by invoice, is in our guide for freelancers with foreign clients, and at Managora we handle your registration and quarterly tax returns for a fixed monthly fee, the price of which is on our plans page.

How do I pay IRPF if my company does not withhold anything?

A foreign company without a permanent establishment in Spain is not obliged to withhold IRPF on your behalf. You receive the gross amount and settle the entire tax in the annual tax return the following year. This is the most expensive cash flow problem in this situation: it is advisable to set aside every month the part that will later have to be paid in one go.

Getting paid without withholding does not exempt you from filing a tax return either, quite the opposite. The threshold that obliges you to file the return is much lower when the payer is not obliged to withhold, so in practice almost any salary obliges you to file an income tax return.

If you hold accounts, securities, real estate or cryptocurrencies outside Spain, there are 2 annual informative returns (forms 720 and 721) that are submitted when their thresholds are exceeded. Anyone under the inbound expatriate regime does not submit form 720 during the years the regime applies, because they are taxed under non-resident rules: only on their Spanish income, with the exception of their salary, which is taxed in full.

Can I accidentally create a permanent establishment for my company?

This is the risk that truly worries the company's tax department and the reason why many say no to remote working from Spain. If from your home you negotiate and conclude contracts that bind the company, or if the company formally imposes your home as an office and covers your expenses, the tax agency may consider that this company has a permanent establishment in Spain, with the obligation to declare the profit attributed to it here.

A purely technical position, without the capacity to bind the company and with a laptop as the only means, is in the reasonably safe zone. But the Directorate General for Taxes resolves on a case-by-case basis and looks at the material and human resources that the company actually controls in Spain, not the job title.

The detail that almost no one looks at: the OECD multilateral instrument (MLI) has modified the dependent agent clause of a large part of the agreements signed by Spain and has expanded the scenarios in which a permanent establishment is deemed to exist. Before accepting an answer as valid, you must read the agreement of your company's country in its already modified version, which is what we do when opening your file.

What if I am not a European Union citizen?

Then immigration comes first. Ley 14/2013 (the Spanish Entrepreneurs Act), with the chapter added by the startups law, created the visa and residence authorisation for international remote work, the digital nomad route: working remotely for companies located outside Spain, as an employee only for foreign employers, or self-employed provided that work for companies located in Spain does not exceed 20% of your total professional activity.

If you are already in Spain in a regular situation, you apply for a residence authorisation of up to 3 years before the Large Companies and Strategic Groups Unit (UGE-CE), which resolves within 20 working days from the electronic submission and where silence is positive; if you apply while in a legal stay, that stay is extended until it is resolved. We submit it with your mandate. If you are abroad, what you request is the remote work visa of up to 1 year at the Spanish consulate: you submit it (or your accredited representative, if that consulate allows it) and we prepare and review your file. With the visa, the authorisation to remain in Spain is requested in the 60 calendar days before it expires. Among the requirements, you must prove financial means of 200% of the minimum interprofessional wage: in 2026 the consulates set them at €2,442 per month (double the monthly minimum wage of €1,221), plus 75% of that minimum wage for the first family member (€916) and 25% for each of the others (€306).

If you work remotely as an employee, this authorisation is also the natural gateway to the inbound expatriate regime, so the order and dates matter: the 6-month deadline for form 149 starts running with the activity start date shown on your Seguridad Social registration and does not wait for you to finish the rest of the procedures. You can see the updated amount in the Digital Nomad Visa and Residence file.

Managora prepares and submits it for you from start to finish: the registration of your company with the Seguridad Social as an employer without an establishment, your registration, the agreement so that contributions are paid without friction, the A1 certificate when applicable, the international remote work authorisation, form 149 within the deadline and your annual tax return.

Step by step

  1. 1

    Set a date for your arrival and count the days(Before moving, or as soon as you arrive)

    Set the day you start living and working in Spain and calculate how many days of the calendar year you will spend here. Whether you are a tax resident in 2026 or 2027 depends on that number, and with it everything else. Keep tickets, rental contract and empadronamiento (registration on the municipal census): they are the proof.

  2. 2

    Choose the route: contract with your company, employer of record or autónomo(Before signing anything)

    Contract with the foreign company registered with the Spanish Seguridad Social, employer of record that hires you here, or registration as an autónomo invoicing. If you are going to work exclusively for a single payer, the autónomo route is the one that accumulates the most risk of being a false freelancer.

  3. 3

    If you are not an EU citizen, resolve immigration first(UGE-CE: 20 working days, with positive silence. Consular visa: 10 working days)

    Residence authorisation for international remote work before the UGE-CE if you are already in Spain in a regular situation, or remote work visa at the Spanish consulate if you are abroad. Without this, the rest of the registrations cannot be sustained.

  4. 4

    Get your NIE and your Seguridad Social number(Before registration)

    Without a NIE (foreigner identity number) and without a Seguridad Social affiliation number, no registration is possible. Anyone who has never worked or been insured in Spain needs to request the number with form TA.1 before any registration.

  5. 5

    Register the company and enrol yourself(Employment route and census registration with Hacienda: before starting work. Registration in the RETA: the same day you start or up to 60 days before)

    Employment route: registration of the foreign company as an employer without an establishment (TA.6), your enrolment in the general regime (TA.2/S) and, if of interest, the agreement under article 21.2 of Regulation 987/2009 so that you are the one who pays the contributions. Autónomo route: census registration with Hacienda (form 036) and registration in the RETA (TA.0521), requesting the flat rate in that same registration if you are eligible.

  6. 6

    Finalise where you contribute and request the A1 if applicable(Before the first posting or the start of cross-border telework)

    If you work in 2 States or want to apply for the Framework Agreement on cross-border telework, you must request the determination of the applicable legislation (form TA.300) and obtain the A1 certificate that proves it. The A1 is only valid within the European regulations: if the posting is to a country with a bilateral agreement, what is issued is the specific form for that agreement.

  7. 7

    Submit form 149 if you opt for the inbound expatriate regime(6 months from the activity start date shown on your Seguridad Social registration in Spain, which is not always the day the registration is processed)

    With the employer's document acknowledging the remote employment relationship, the activity start date and the estimated duration. It is a strict deadline: it does not allow for extension or late rectification.

  8. 8

    Declare every year and keep your tax residency certificate(Income tax campaign of the following year, usually from April to June)

    Form 151 if you are under the inbound expatriate regime, form 100 if you pay taxes under the general regime, plus forms 720 and 721 when applicable. The Spanish tax residency certificate is what prevents them from also withholding taxes in your company's country.

A worked example

Single Irish engineer who moves to Madrid on 1 March 2026 and remains employed by her Dublin company, which registers as an employer without an establishment and enrols her that same day. Gross annual salary: €90,000. She has never lived in Spain.

  • Days in Spain in 2026: from 1 March to 31 December is 306 days. More than 183, so she is a tax resident in Spain for the entire 2026 financial year, including the months she lived in Ireland.
  • The work is physically performed in Spain, so that salary is taxed in Spain. With the Spanish tax residency certificate in hand, she asks her company to stop applying Irish withholding tax and claims the over-withheld amount in Ireland.
  • She opts for the inbound expatriate regime: she complies with not having been a resident in the previous 5 periods and her relocation responds to a remote work activity with telematics means.
  • Tax liability for the salary under the special regime: 24% on €90,000, without personal minimums or regional deductions, that is €21,600.
  • Form 149 deadline: 6 months from 1 March 2026, which is the activity start date shown on her Seguridad Social registration, meaning it expires on 1 September 2026.
  • As the Irish company has no permanent establishment in Spain, it does not withhold anything: she receives €90,000 gross and pays the €21,600 in the 2027 income tax campaign. By setting aside €1,800 a month she arrives without surprises.

€21,600 tax liability for the 2026 salary applying the 24% rate of the inbound expatriate regime in common territory, compared to the general progressive scale, which at that income level is significantly higher. The date to note on the calendar is 1 September 2026: if form 149 is not submitted that day, the option is lost.

Forms, who submits them and when

FormWhat it is forWho submits itDeadline
TA.6To register the foreign company with the Seguridad Social as an employer without an establishmentThe companyBefore you start the activity in Spain
TA.2/SEnrolment of the employeeThe company, or yourself with the agreement under article 21.2 of Regulation 987/2009Before starting, and up to 60 days before
TA.300To request the applicable social security legislation and the A1 certificate (or, with bilateral agreement countries, the specific form for that agreement)The company or the workerBefore the posting or cross-border telework
TA.0521Registration in the RETA via the autónomo routeYouThe same day you start or up to 60 days before
Form 036Census registration with Hacienda as an autónomo (form 037 is abolished since 3 February 2025)YouBefore starting the activity
Form 149To opt for the special inbound expatriate regimeYou6 months from the activity start date shown on the registration
Form 151Annual tax return for those under the regimeYouIncome tax campaign of the following year
Form 100Ordinary income tax returnYouIncome tax campaign of the following year

The thresholds that decide your case

ConceptThresholdWhat it decides
Stay in SpainMore than 183 days in the calendar yearMakes you a tax resident for the entire financial year: Spain does not split the year
Centre of economic interestsThat the main core of your activities or interests is located in SpainMakes you a resident even if you spend less than 183 days here
Previous years without tax residency in SpainThe previous 5 tax periodsGateway to the inbound expatriate regime (common territory)
Duration of the inbound expatriate regimeThe first calendar year with more than 183 days in Spain after relocation and the following 5How many financial years you pay taxes under the special regime
Inbound expatriate regime rate24% up to €600,000 and 47% on the excessWhat you pay on your salary if you opt in, only in common territory
Substantial part of the activity in the country of residenceIndicative 25% of working time or remunerationIf you work in 2 States, it attracts all the contribution to Spain
Framework Agreement on cross-border teleworkLess than 50% of the time teleworked from the country of residenceAllows you to continue contributing in the company's country, only between signatory States and upon request
Maximum duration of the cross-border telework agreement3 years, renewable with a new requestHow often the A1 must be renewed
Form 149 deadline6 months from the activity start date shown on your Seguridad Social registrationIf missed, you lose the inbound expatriate regime
Financial means for the digital nomad visa200% of the minimum interprofessional wage: in 2026, €2,442 per month as published by the consulates (€34,188 per year), plus €916 for the first family member and €306 for each of the othersRequirement for the international remote work authorisation
Work for Spain by the self-employed digital nomadMaximum of 20% of your total professional activityLimit to obtain and maintain the authorisation; it is measured by volume of activity, not by number of clients

Contract with your foreign company or invoicing as an autónomo

Employment contract with the foreign company registered in SpainAutónomo invoicing that company
Who registersThe company registers as an employer without an establishment (TA.6), after obtaining a non-resident tax identification number and, if acting through a representative, a notarial power of attorney, and enrols you in the general regime (TA.2/S)You, with Hacienda using form 036 and in the RETA with TA.0521
Who pays the contributionsThe company, or yourself if you sign the agreement under article 21.2 of Regulation 987/2009 and they pay them to you with your payrollYou, with the RETA contribution corresponding to your expected net yield
Social protectionFull general regime: unemployment, temporary disability, retirementNo unemployment: only the cessation of activity benefit, with its own requirements
IRPF during the yearNo monthly withholding if the company has no permanent establishment in Spain: everything is paid in the annual tax returnQuarterly instalment payments with form 130 and then the annual tax return
Access to the inbound expatriate regimeFits into the remote work modality, which requires an employment relationship acknowledged by the employerOnly through the entrepreneurial activity or highly qualified professional modalities, with their own requirements
VATNot applicable: what you receive is a payrollYour services are located where the client is; if it is an EU company you need the intra-community operators register and form 349
Main riskThat the company ends up having a permanent establishment in Spain if you negotiate and close contractsFalse freelancer if you work exclusively, with the company's schedule, means and instructions
Cost for the companySpanish employer contribution on your salaryOnly your invoice, which is exactly the reason why many companies propose it

Official forms and where it is filed

Frequently asked questions

Can I continue getting paid by my foreign company without registering for anything in Spain?

No. If you live and work here, the competent social security is the Spanish one unless you fit into an exception and have it documented with an A1 certificate. And even if no one withholds taxes from you, Spanish IRPF accrues anyway. What happens is that non-compliance takes time to surface, and when it does, it arrives with backdated contributions, surcharges, interest and a penalty.

How long does it take to get everything in order?

The company's registration and your enrolment in the Seguridad Social are resolved in days. The international remote work authorisation before the UGE-CE has a 20 working day deadline and positive silence; the consulate visa, 10 working days. Form 149 is submitted instantly, but only within the 6 months following the activity start date shown on your Seguridad Social registration.

What happens if I submit form 149 outside the 6 months?

You lose the inbound expatriate regime for that relocation and pay taxes on the general progressive scale. It is not an extendable deadline nor can it be rectified later, and it is the most expensive mistake we see in this type of file: that is why the first thing we set when opening your case is the activity start date shown on your Seguridad Social registration, which is what those 6 months count from.

My company says they cannot register in Spain, what do I reply?

That they do not have to open a subsidiary or branch: they register as an employer without an establishment, after obtaining a non-resident tax identification number and, if the processing is done by a representative in Spain, with a power of attorney that usually requires a notario and an apostille, and they can sign with you the agreement provided for in the European social security regulation so that you are the one who pays the contributions every month. If they still do not want to, there remains the employer of record and the autónomo route. We prepare the explanation and the forms for your human resources department.

I have been working remotely from Spain for 1 year without saying anything. Can I be penalised?

Yes. On the Seguridad Social side, the contributions for the period are claimed with a surcharge, and on the tax side, a tax return submitted late carries an increasing surcharge depending on the months of delay plus interest. Regularising before the requerimiento (a formal demand from the authorities) arrives greatly reduces the cost: it is a difference in percentage, not a nuance, and it is advisable to do it as soon as it is detected.

Do I have to declare my accounts and investments abroad?

If you are a tax resident under the general regime, yes, through the annual informative returns for assets abroad (forms 720 and 721) when you exceed their thresholds. If you are under the inbound expatriate regime, you do not submit form 720 during the years the regime applies, because you are taxed under non-resident rules; your family members who do not opt in and are tax residents may indeed be obliged.

We handle the whole procedure for you, from start to finish.

You describe your case in a chat and sign; we file it with the Spanish authorities. Fixed price from €180.00 (21% VAT included), plus the tasa (official fee) where there is one.

See the procedure

Related procedures

The price, the tasa (official fee) and the current deadlines are on each procedure page.

If you are refused or need to appeal

Handled by Managora's law firm.

Related guides

Share this guide

If you found it useful, chances are someone you know needs it right now.