Social insurance in Shanghai for foreigners (五险一金)

Part of your salary quietly disappears into China's "five insurances and one fund" — and a surprising amount of it is your money that you can get back. Here's what it is, what you and your employer pay, and how to reclaim it when you leave.

What the "five insurances and one fund" are

Employers in China contribute to a mandatory social security package. The five insurances (五险):

  • Pension insurance (养老保险) — funds your Chinese state pension (and can be withdrawn when you leave).
  • Medical insurance (医疗保险) — pays for hospital visits, clinics and pharmacy at designated institutions.
  • Unemployment insurance (失业保险) — benefits if you lose your job (rarely claimed by foreigners).
  • Injury insurance (工伤保险) — covers work injuries; employer pays entirely.
  • Maternity insurance (生育保险) — maternity benefits; in Shanghai it's now merged into medical insurance.

Plus the one fund (一金): the housing fund (公积金) — a forced savings account for housing, paid by both you and your employer, fully yours to withdraw later (see the housing fund glossary).

Who pays how much (Shanghai rates, approximate)

ComponentEmployerEmployee (you)
Pension16%8%
Medical~9.5%2%
Unemployment0.5%0.5%
Injury0.16–1.52%0
Maternity(merged into medical)0
Housing fund5–7%5–7% (usually 7%)

Your employee share is roughly 10.5% (social insurance) + 5-7% (housing fund) of your salary — that's the "bite" you see on your payslip, on top of income tax. The contribution base is capped (≈¥36,900/month in 2024) and floored (≈¥7,400).

See the exact numbers for your salary in the salary calculator.

Do foreigners really join?

Since 2011, foreign employees can and normally do participate in social insurance. In practice in Shanghai:

  • Most employers enroll foreign staff in the standard scheme — at minimum medical insurance (many companies enroll pension too).
  • Some companies rely on bilateral agreements to exempt foreign employees from pension contributions (see below).
  • You can check your enrollment in the 随申办 app under social insurance records, or ask HR for your 社保缴纳明细.
What this means for your take-home

If your employer only enrolls you in medical insurance, your take-home is higher than the full 10.5%+7% estimate. The salary calculator shows the full-enrollment scenario — ask HR which one applies to you.

The one that matters daily: medical insurance

  • You get a Shanghai medical insurance card (医保卡) (or an electronic card in 随申办) after enrollment.
  • Present it when registering at public hospitals and pharmacies — part of the cost is covered automatically.
  • It's not international insurance: it pays for treatment in mainland China's designated institutions, not abroad, and private international hospitals are often out-of-network. Many expats keep both Chinese social medical insurance and their international health plan.
  • Emergency room visits at public hospitals are cheaper with the card; without it you pay a deposit and claim from your insurer.

Bilateral agreements with your home country

China has social security agreements with several countries (including Germany, Netherlands, Korea, France, Finland, Luxembourg, Spain, Switzerland, Serbia and others). Under these agreements:

  • You may be exempt from Chinese pension contributions for a period (often 3-6 years, extendable), because you keep contributing to your home country's pension.
  • You apply for the exemption certificate through your home country's pension office and give it to your Shanghai employer.
  • Contribution years in China can sometimes be combined with home-country years for pension purposes.

This is a real money question: if you're German/Dutch/Korean, the exemption can save you 8% of your salary every month. Ask your HR whether a bilateral agreement applies to you.

Getting your money back when you leave

When you terminate employment and leave China (or become a non-employee), you can withdraw:

  • The employee portion of your pension — your 8%, not the employer's 16% (the employer's share goes to the pool).
  • Your entire housing fund balance — both your 5-7% and your employer's 5-7%. This is the big one: years of contributions can be a meaningful lump sum.
  • Process: bring passport, residence permit, employment termination letter (离职证明) and your card to the relevant offices (housing fund at 上海市公积金管理中心, pension at the social insurance center), or use 随申办/一网通办 online. Ask HR to walk you through — they've done it before.
Silver lining

The housing fund is effectively forced savings with an employer match — like a 401(k) you cash out on exit. A ¥30,000/month salary at 7%+7% for 3 years builds ≈¥150,000 you get back when you leave. Not bad.

Questions & answers

Do foreigners have to join Chinese social insurance?

Yes, in most cases. Since 2011 foreign employees can and normally do participate. Employers in Shanghai usually enroll you in at least medical insurance; many enroll the full scheme.

Can I get my pension when I leave China?

You can withdraw the employee-paid portion of your pension when you leave permanently. The employer-paid portion stays in the pool. Some bilateral agreements let you combine years instead.

Does my home country social insurance still apply?

China has bilateral agreements with several countries (Germany, Netherlands, Korea, France, Finland, Luxembourg, Spain, Switzerland, Serbia and others). Under them, pension contributions may be exempt for a limited period — check with your home pension office and HR.

What is the medical insurance card used for?

The Shanghai 医保卡 pays for outpatient visits, hospital stays and pharmacy at designated institutions. Link it when registering at public hospitals. It does not cover treatment abroad or most private international hospitals.

Can I withdraw my housing fund when leaving?

Yes — the full balance (your contributions plus your employer's) when you terminate employment and leave China. Bring passport, residence permit, termination letter and card.

Related: Five insurances explained · Housing fund · Salary calculator · Hospitals & medical care · Hotline 12333 (social insurance)