Yes, undocumented immigrants do pay into Social Security, and they pay a lot. The Social Security Administration estimated that unauthorized workers contributed roughly $25.7 billion in Social Security taxes in 2022 and about $26.2 billion in 2023. Almost none of them will ever see a benefit check. Federal law bars payments to anyone in the United States who is not lawfully present, so the money stays in the Trust Fund and helps pay the retirement, disability, and survivor benefits of people who are eligible.
How the Taxes Get Withheld
Most undocumented workers who pay into Social Security are on a regular payroll. Their taxes come out through the same automatic withholding that applies to every other employee. What varies is how they got onto that payroll in the first place.
Some workers file federal taxes using an Individual Taxpayer Identification Number, a nine-digit number the IRS issues to people who need to file but aren’t eligible for a Social Security number. An ITIN is a tax-filing tool only. It doesn’t authorize employment and doesn’t change immigration status.1Internal Revenue Service. Individual Taxpayer Identification Number (ITIN)
Others give their employer a Social Security number that doesn’t belong to them, or one that was issued for a limited work-authorized purpose and has since lapsed. Employers run payroll on whatever number the worker provides. The taxes are withheld and sent to the Treasury either way.
Not every undocumented worker is in this pool. Anyone paid entirely in cash or off the books never appears on a payroll and has no taxes withheld. The billions flowing into the Trust Fund come specifically from workers whose employers process wages through normal channels.
Both Sides of the Paycheck Are Taxed
The Federal Insurance Contributions Act imposes the payroll tax on both the worker and the employer. The employee has 6.2 percent withheld for Social Security and 1.45 percent for Medicare.2Office of the Law Revision Counsel. 26 U.S.C. 3101 – Rate of Tax The employer matches those amounts exactly.3Office of the Law Revision Counsel. 26 U.S.C. 3111 – Rate of Tax That’s why the $25 to $26 billion figures are so large. They combine both halves of the payroll tax on wages employers reported.
Where the Money Goes
When the SSA receives a W-2 and the name and Social Security number on it don’t match anything in its records, the earnings can’t be posted to any individual’s work history. They land in the Earnings Suspense File, a database that has accumulated trillions of dollars in uncredited wages over the decades.4Social Security Administration. Social Security Administration’s Master Earnings File: Background Information
The taxes withheld on those wages don’t sit in escrow waiting for the worker to be identified. They go straight into the Trust Fund and are pooled with every other Social Security dollar to pay current beneficiaries. The SSA itself has acknowledged that the presence of unauthorized workers has, on average, a positive effect on the program’s finances.
Why They Cannot Collect Benefits
Federal law is explicit. Under 42 U.S.C. § 402(y), no monthly Social Security benefit can be paid to a person in the United States who is not lawfully present.5Office of the Law Revision Counsel. 42 U.S.C. 402 – Old-Age and Survivors Insurance Benefit Payments That prohibition covers retirement, disability, and survivor benefits for dependents.
A worker normally needs 40 credits of covered employment, about ten years of work, to qualify for retirement benefits.6Social Security Administration. How You Earn Credits An undocumented worker who has paid taxes for 20 or 30 years and accumulated well over 40 credits still cannot collect anything while they remain without legal status. The credits exist somewhere on paper. The law treats them as irrelevant until lawful presence is established.
Medicare Taxes, No Medicare
The same one-way street runs through Medicare. Every paycheck has 1.45 percent withheld for the Hospital Insurance Trust Fund, and the employer matches it. To enroll in Medicare, though, a person must be a U.S. citizen, a lawful permanent resident, or hold another qualifying immigration status.7Medicare.gov. Medicare and You Handbook 2026 Undocumented workers pay the tax for their entire careers and get no access to the coverage it funds.
Income Tax Refunds and the EITC
Social Security and Medicare benefits are locked, but the federal income tax system works differently. Undocumented workers who file returns with an ITIN can receive refunds when they’ve overpaid, the same as any other filer.8Internal Revenue Service. Topic No. 857, Individual Taxpayer Identification Number (ITIN)
There is one large exclusion. The Earned Income Tax Credit, one of the biggest anti-poverty benefits in the tax code, requires a valid Social Security number. The statute defines the required taxpayer identification number for EITC purposes as an SSN, not an ITIN.9Office of the Law Revision Counsel. 26 U.S.C. 32 – Earned Income An ITIN filer who meets every income requirement still can’t claim it, and the IRS confirms this on its ITIN guidance page.1Internal Revenue Service. Individual Taxpayer Identification Number (ITIN)
What Changes After Gaining Legal Status
If an undocumented worker later obtains legal status, whether through marriage, an employer petition, or a future legalization program, the years of payroll taxes may finally count toward benefits. Whether they do depends on when the worker’s Social Security number was first assigned.
The Social Security Protection Act of 2004 drew a dividing line. For workers whose SSN was assigned before January 1, 2004, all covered earnings count toward benefit eligibility, regardless of whether the worker was authorized to work at the time. For workers whose SSN was assigned on or after January 1, 2004, the rule is stricter: the worker must have been issued an SSN for work purposes, or must have obtained work authorization at some point, before any earnings count toward insured status.10Social Security Administration. POMS RS 00301.102 – Additional Requirements for Alien Workers
In practice, a person who gains legal status and receives a work-authorized SSN can potentially reclaim their entire earnings history, including wages earned while undocumented. The SSA has procedures for transferring earnings from one SSN to another, or from the Earnings Suspense File to a valid account, if the worker can produce documentation like W-2s or old tax returns proving the wages are theirs.11Social Security Administration. When Earnings May Be Transferred The process isn’t automatic. The worker has to come forward with evidence, and the SSA reviews each case on its own facts.
Totalization Agreements for Workers Who Return Home
The United States has bilateral Social Security agreements, called totalization agreements, with about 30 countries. They let workers who split a career between two countries combine credits from both systems to qualify for benefits neither system alone would grant. The eventual benefit is prorated based on how long the worker contributed to each program.12Office of the Law Revision Counsel. 42 U.S.C. 433 – International Agreements A worker needs at least six quarters of U.S. coverage to use one.
These agreements don’t override § 402(y)’s ban on paying benefits to people unlawfully present in the U.S.5Office of the Law Revision Counsel. 42 U.S.C. 402 – Old-Age and Survivors Insurance Benefit Payments They can matter, though, for a worker who eventually returns to their home country. If that country has a totalization agreement with the United States, the worker might receive a prorated U.S. benefit paid abroad, provided they meet all other eligibility rules, including the work-authorization requirement from the 2004 Act. It’s a narrow path. But it is the one scenario in which contributions from U.S. work could eventually produce some return for a noncitizen living outside the country.