Millions of remote workers have discovered they can do their jobs from a beach in Bali, a café in Lisbon, or a co-working space in Mexico City just as effectively as from their home office. The technology works. The Wi-Fi is fast enough. The time zones can be managed. But most of these workers are ignoring a critical question: is what they’re doing actually legal?
The honest answer is complicated. Working remotely from another country sits at the intersection of immigration law, tax law, employment law, and social security agreements — and the rules differ depending on your citizenship, your employer’s location, the country you’re working from, and how long you stay. Getting it wrong can mean visa violations, double taxation, penalties from your employer, or even deportation.
This guide covers everything you need to know to work remotely from abroad legally: the 183-day tax residency rule, tourist visa limitations, digital nomad visas, employer considerations, contractor structures, tax obligations, social security, health insurance, and a practical checklist for going fully compliant. We focus primarily on US and UK citizens, but the principles apply broadly.
For country-specific visa options, see our complete list of digital nomad visas by country. For tax strategy specifically, our digital nomad tax guide goes deeper on that topic.
The 183-Day Tax Residency Rule
The single most important number in international remote work is 183. In most countries, spending 183 days or more within a tax year triggers tax residency — meaning that country can tax your worldwide income, not just income earned locally. This is the threshold that separates a temporary stay from a legal obligation to file and pay taxes in your host country.
How the rule works in practice:
- Calendar year vs. rolling period: Most European countries count days within the calendar year (January 1 to December 31). Some countries, including the UK with its Statutory Residence Test, use a rolling 12-month period or apply more complex multi-year rules.
- What counts as a “day”: In most jurisdictions, being present at midnight counts as a day. Some countries count partial days. A few — like Portugal — count any part of a day as a full day of presence.
- Country variations: The 183-day rule is a general guideline, not a universal law. Canada uses a “significant residential ties” test that can trigger residency in far fewer days. Australia uses 183 days but also considers your domicile, permanent home, and superannuation. Germany considers you resident from day one if you maintain a dwelling there.
- Tax treaties may override: If your home country has a double taxation agreement (DTA) with the country you’re visiting, the treaty’s tie-breaker rules determine which country gets to tax you when you qualify as a resident in both. These treaties often look at your “centre of vital interests” — where your family, bank accounts, and social ties are.
The practical takeaway: if you plan to spend more than five months in any single country, assume you will become a tax resident there and plan accordingly. Many digital nomads deliberately hop countries every 3–4 months specifically to avoid triggering the 183-day threshold — a strategy sometimes called “perpetual traveling.”
Working on a Tourist Visa: Is It Legal?
The most common scenario: you fly to another country on a tourist visa (or visa-free entry), set up in a co-working space, and continue working for your remote employer back home. Millions of people do this. But is it legal?
In almost every country, no. Tourist visas and visa-free entries explicitly prohibit “gainful employment” or “work” in the host country. The legal definition of “work” varies, but immigration authorities generally define it as any activity that generates income — regardless of who pays you or where the money comes from.
The gray area exists because:
- Enforcement is minimal. Immigration officers at the border rarely ask what you do on your laptop. If you’re not taking a job from a local worker, not earning money from a local company, and not staying beyond your visa duration, most countries have little incentive to investigate.
- The law hasn’t caught up. Most immigration laws were written when “work” meant physically going to a local workplace. The concept of doing work for a company in another country while sitting in a coffee shop wasn’t anticipated.
- Some countries tolerate it informally. Thailand, Indonesia (pre-digital-nomad-visa), and several Latin American countries have long had large remote worker communities operating on tourist visas. While technically illegal, enforcement against remote workers earning foreign income has been effectively nonexistent.
The risk is real, however. If an immigration officer discovers you’re working — through your visa interview, social media, or a random inspection — the consequences can include visa cancellation, deportation, entry bans, and difficulty obtaining future visas to that country or others in the same visa zone (like the Schengen Area). Posting “working from paradise” on LinkedIn while on a tourist visa in Bali is the kind of digital paper trail that can cause problems.
Digital Nomad Visas: The Legal Solution
The cleanest way to work remotely from another country is to get a visa that explicitly permits it. Digital nomad visas — also called remote work visas, freelancer visas, or temporary residency permits for independent workers — have proliferated since 2020. As of early 2026, more than 60 countries offer some form of dedicated remote work visa.
These visas typically require:
- Proof of remote employment or freelance income (usually $2,000–$3,500 per month minimum)
- Health insurance valid in the host country
- A clean criminal background check
- Proof that your employer or clients are outside the host country
The best programs offer tax advantages, long durations, and paths to permanent residency. Here are the top 10 countries for digital nomad visas ranked by overall ease and value.
Top 10 Digital Nomad Visa Countries by Ease & Value
Ranked by income threshold, processing time, duration, tax treatment, and renewal options.
Spain
5-year visa, 24% flat tax, path to EU citizenship
Portugal
D8 visa, 1 year renewable, EU residency path
Indonesia
5-year visa, tax-exempt on foreign income
Croatia
1-year visa, tax-exempt, EU member state
Colombia
2-year visa, lowest income req (~$900/mo)
Thailand
DTV: 180-day entries over 5 years
Greece
2-year visa, 50% tax reduction for 7 years
Estonia
1-year visa + e-Residency for EU company setup
Mexico
Temporary resident visa, 1–4 years, low cost
South Korea
Workcation visa: 1–2 years, world-class internet
For the full breakdown of every country’s program, including requirements, costs, and application processes, see our digital nomad visa guide covering every country.
Employment Law Considerations
Even if you have the right visa, your employer may face serious legal complications when you work from another country. This is the piece most remote workers overlook entirely.
Permanent Establishment (PE) Risk
When an employee works from a foreign country for an extended period, the employer may create a “permanent establishment” (PE) in that country under local tax law. A PE means the employer becomes subject to corporate tax, VAT/GST, and regulatory compliance in that jurisdiction. For a US-based startup, having an employee work from France for six months could trigger French corporate tax obligations on the company’s profits attributable to that employee’s work.
PE risk is why many employers restrict international remote work or limit it to 30–90 day windows. The threshold varies by country and by tax treaty, but the risk increases significantly past 183 days.
Payroll and Employment Compliance
An employer paying an employee who works in another country may be required to:
- Register for payroll taxes in the host country
- Withhold and remit local income tax
- Comply with local employment laws (minimum wage, working hours, paid leave, termination protections)
- Contribute to local social security systems
French employment law, for example, applies to anyone performing work in France — regardless of where the employer is based. If you’re “working from France” for your US employer, French labor protections technically apply, and your employer should be withholding French social charges.
Before you leave: always inform your employer and get explicit written approval for international remote work. Ask about their policy, any day-count limits, and approved countries. Many large companies now have formal international remote work policies; smaller companies may not have considered the implications at all.
Contractor vs. Employee Abroad
One way to sidestep employer PE risk is to restructure your work arrangement. There are three main approaches:
1. Convert to Independent Contractor
If you leave your home country and work independently, you may convert from an employee to an independent contractor. You invoice your former employer (now a client) for services rendered. This eliminates PE risk for the company, but means you lose employment benefits (health insurance, retirement contributions, paid leave) and take on responsibility for your own taxes, social security, and insurance.
Caution: simply relabeling an employment relationship as “contracting” without changing the nature of the work is illegal in most jurisdictions. If you still work set hours, use company equipment, report to a manager, and work exclusively for one client, tax authorities may reclassify you as an employee — with back taxes, penalties, and social security contributions owed by both parties.
2. Use an Employer of Record (EOR)
An Employer of Record is a company that legally employs you in the country where you’re working. Your original employer contracts with the EOR, the EOR handles local payroll, tax withholding, benefits, and compliance, and you remain a proper employee with all local protections. Services like Deel, Remote, and Papaya Global offer this. Monthly costs typically range from $300–$700 per employee.
EORs are increasingly the preferred solution for companies that want to support international remote work without the legal complexity of setting up foreign entities. If your employer won’t use an EOR, it may be a sign they haven’t thought through the legal implications.
3. Set Up Your Own Company Abroad
Some digital nomads establish a company in a favorable jurisdiction — Estonia’s e-Residency program is popular for this — and contract through that entity. This gives you control over your tax structure but adds administrative complexity and costs. It works best for freelancers and independent consultants with multiple clients.
Tax Obligations When Working Abroad
Tax is where most remote workers get into trouble. Here are the key concepts:
For US Citizens: The FEIE
The US taxes its citizens on worldwide income regardless of where they live. However, the Foreign Earned Income Exclusion (FEIE) allows qualifying Americans abroad to exclude up to $126,500 (2026 amount) of earned income from US federal income tax. To qualify, you must either be physically present outside the US for at least 330 days in a 12-month period (Physical Presence Test) or be a bona fide resident of a foreign country for an entire tax year.
For a detailed comparison of the FEIE vs. the Foreign Tax Credit, see our FEIE vs. Foreign Tax Credit guide.
Tax Treaties and Double Taxation
The US has tax treaties with over 60 countries designed to prevent double taxation. These treaties typically establish which country has primary taxing rights over different types of income (employment income, self-employment income, investment income, pensions). If you’re paying taxes to your host country, you can often claim a Foreign Tax Credit (FTC) on your US return to offset dollar-for-dollar what you’ve already paid abroad.
UK citizens benefit from an extensive network of over 130 double taxation agreements. Once you’re no longer UK tax resident (determined by the Statutory Residence Test), you generally stop owing UK income tax on foreign earnings.
FBAR and FATCA Reporting
US citizens with foreign bank accounts exceeding $10,000 in aggregate at any point during the year must file an FBAR (FinCEN Form 114). FATCA (Form 8938) requires reporting foreign financial assets above higher thresholds ($200,000 for single filers living abroad). These are reporting requirements, not additional taxes — but the penalties for non-compliance are severe: up to $100,000 or 50% of account value per violation.
For the complete breakdown, read our expat tax guide for Americans.
Social Security & Benefits
Social security is the forgotten cost of working abroad. When you work in another country, you may be required to contribute to that country’s social security system — potentially while still contributing to your home country’s system. Without proper planning, you could pay into two systems simultaneously and get reduced benefits from both.
Totalization Agreements
The US has totalization agreements with about 30 countries that prevent dual social security taxation and allow you to combine work credits from multiple countries toward benefit eligibility. If you’re covered by a totalization agreement, you typically only pay into one country’s system. For countries without an agreement (most of Southeast Asia, Latin America, and Africa), you may need to contribute to both systems.
Maintaining Home Country Benefits
US Social Security requires 40 quarters (10 years) of contributions for retirement benefit eligibility. If you leave the US before reaching that threshold, you may not qualify for benefits. Self-employed Americans abroad can continue voluntary contributions via self-employment tax. UK citizens can make voluntary National Insurance contributions (Class 2 or Class 3) to maintain their State Pension entitlement while living abroad.
Health Insurance Requirements
Most digital nomad visas and long-stay residency permits require proof of health insurance as a condition of approval. Even in countries that don’t mandate it, going without health coverage abroad is financially reckless.
Your options:
- International health insurance: Providers like Cigna Global, Allianz Care, and IMG offer plans designed for expats and remote workers. Expect to pay $100–$400 per month depending on coverage level, age, and region. These plans are accepted for most visa applications.
- Digital nomad insurance: SafetyWing and World Nomads offer lower-cost plans ($40–$80/month) specifically designed for location-independent workers. Coverage limits are lower, but they are accepted by many digital nomad visa programs.
- Local health insurance: Some countries allow (or require) you to enroll in the national healthcare system once you become a tax resident. Spain, Portugal, and Thailand all offer affordable public healthcare that foreign residents can access.
- Your employer’s plan: Some international health plans from employers cover you abroad. Check if yours applies outside your home country — most domestic plans (including US employer plans) do not.
For a comprehensive comparison, see our expat health insurance guide.
Tourist Visa vs. Digital Nomad Visa vs. Local Work Permit
Understanding the differences between these three pathways is essential. Here’s how they compare across the metrics that matter most.
| Metric | 🇽🇽 Tourist Visa | 🇽🇽 Digital Nomad Visa |
|---|---|---|
| Remote work legality | Technically illegal | Fully legal |
| Typical duration | 30–90 days | 1–2 years |
| Income requirement | None | $2K–$3.5K/mo |
| Tax obligations | Home country only | Varies by program |
| Can work for local clients | No | Usually no |
| Path to residency | No | Sometimes |
| Health insurance required | Rarely | Almost always |
| Application complexity | Minimal | Moderate |
| Deportation risk if working | Moderate | None |
| Best for | Short trips (<90 days) | Long-term remote work |
A local work permit is a third option but typically requires a local employer sponsor, is tied to a specific job, and involves full tax residency obligations. It’s the right choice if you’re taking a job with a local company, but overkill for remote workers earning from employers abroad. For most digital nomads, the digital nomad visa is the sweet spot between legality and flexibility.
10-Step Checklist to Work Remotely Abroad Legally
Follow these steps before you book your flight:
- Check your employment contract. Look for clauses about work location, remote work policies, and geographic restrictions. Many contracts require you to work from a specific country or region.
- Get written employer approval. Email your manager and HR to confirm they permit international remote work. Document approved countries and maximum duration. If they say no, respect it — the PE risk is theirs to manage.
- Research visa requirements. Determine whether your destination offers a digital nomad visa. If not, understand the limitations of tourist entry. Use our visa checker tool to explore options.
- Apply for the right visa. If staying more than 90 days or if you want legal clarity, apply for a digital nomad visa or temporary residency permit. Start the process 2–3 months before departure — some require consulate appointments in your home country.
- Understand your tax obligations. Determine your tax residency status in both your home country and destination. Identify applicable tax treaties. Consult an international tax advisor if your situation is complex.
- Set up FEIE or FTC (US citizens). If you qualify for the Physical Presence Test, start tracking your days abroad from day one. Keep meticulous records of entry and exit dates. Consider whether the FEIE or Foreign Tax Credit is more advantageous for your income level.
- Secure health insurance. Get international health coverage that meets your destination’s visa requirements. Keep your policy documentation accessible for immigration checkpoints.
- Open a multi-currency bank account. Services like Wise, Revolut, or Charles Schwab International make it easier to manage money across borders without excessive conversion fees. File your FBAR if required.
- Track your days carefully. Use a spreadsheet or app to log every country entry and exit. You need this for the 183-day tax residency calculation, the FEIE Physical Presence Test, and Schengen Area day limits.
- Review annually. Tax laws, visa programs, and employer policies change frequently. At least once a year, reassess your setup with a tax professional who specializes in expats and digital nomads.
Countries Where It’s Easiest to Work Remotely
Some countries have gone out of their way to welcome remote workers with clear legal frameworks, low barriers, and attractive incentives. Here are five standouts:
- Portugal — The D8 digital nomad visa offers a clear legal path with relatively low income requirements and access to the entire EU. The Non-Habitual Resident (NHR) tax regime offered significant tax benefits for new residents.
- Spain — The Ley de Startups visa grants up to five years of residency with a flat 24% tax rate on Spanish-source income. Processing is straightforward and the program is well-established.
- Croatia — A one-year digital nomad visa with complete tax exemption on foreign-sourced income. Low cost of living, EU membership, and beautiful coastline make it a top choice.
- Mexico — The temporary resident visa is easy to obtain, lasts up to four years, and Mexico has a large established digital nomad community with excellent infrastructure in cities like Mexico City, Playa del Carmen, and Oaxaca.
- Thailand — The Destination Thailand Visa (DTV) offers 180-day entries over five years, specifically designed for remote workers. Combined with Thailand’s low cost of living and world-class co-working spaces, it’s one of the best value propositions anywhere.
Ready to find your best country?
Check Visa Requirements for Any CountryThe Bottom Line
Working remotely from another country is entirely possible to do legally — it just requires more planning than most people realize. The days of “just hopping on a flight and opening your laptop” without consequences are ending as governments catch up to the reality of remote work. Tax authorities are getting smarter, immigration databases are more connected, and employers are increasingly aware of their cross-border compliance obligations.
The good news: the legal infrastructure to support international remote work has never been better. Digital nomad visas provide a legitimate path in dozens of countries. Tax treaties prevent most double taxation. EOR services make employment compliance straightforward. And the FEIE gives American workers a significant tax advantage when living abroad.
The cost of doing it right is minimal compared to the cost of getting caught doing it wrong. A few hours of research, a visa application, and an annual consultation with an international tax advisor will protect you from penalties, deportation, and years of messy back-filing. Your future self — sitting legally in that Lisbon café — will thank you.
Further Reading
- Best Digital Nomad Visas in 2026 — detailed rankings of every program worth considering
- Digital Nomad Tax Guide — comprehensive tax strategy for location-independent workers
- Expat Taxes: What Americans Need to Know — FEIE, FTC, FBAR, and FATCA explained
- Digital Nomad Visa for Every Country — the complete list of 60+ programs worldwide
- FEIE vs. Foreign Tax Credit — which exclusion strategy saves you more money