Congress has determined that 401(k) and other company plan funds, with certain exceptions, should be saved for retirement. For that reason, it has imposed strict restrictions on the ability of employees to withdraw from these plans while still working.
Plans must follow these rules, or they risk losing their tax-qualified status. But plans are free to impose even stricter rules than required by the tax code. So, check your plan written summary or ask your plan administrator or HR rep for the particular withdrawal rules that apply to your plan.
Restrictions on Withdrawals:
Each 401(k) account has its own restriction rules:
Pre-tax and Roth Employee Contributions
Generally, 401(k) plans can’t allow in-service distributions from pre-tax and Roth employee contribution accounts before age 59 ½. But withdrawals from these accounts are available, if the plan allows, in case of financial hardship, disability or birth or adoption, and for active reservists. Plans also may allow SECURE 2.0 withdrawals (discussed below).
After-tax Contributions
Plans that offer non-Roth after-tax contributions can allow those contributions and their earnings to be withdrawn at any time, even before age 59 ½. This would be helpful if employees are able to use the “Mega Backdoor Roth” strategy to convert after-tax contributions to Roth IRAs.
Emergency Savings Contributions
Employers can offer lower-paid workers a special account within a 401(k) plan for emergency savings contributions made on a Roth basis. Withdrawals from these accounts are available at least monthly.
Employer Contributions
Most plans that allow in-service withdrawals from employer contribution (matching or nonelective/across-the-board) accounts follow the same rules that apply to pre-tax and Roth employee contribution accounts. This simplifies plan administration. But plans can be more liberal and allow withdrawals at a specified age (even earlier than 59 ½), after at least five years of plan participation or after the contribution has been in the plan for at least two years.
Rollover Contributions
Some 401(k) plans allow employees to roll over pre-tax retirement accounts, including IRAs, into the plan. Plans can allow in-service withdrawals from rollover contribution accounts at any time, regardless of age or service. But this is not mandatory and here again, many plans apply the same rules that apply to pre-tax and Roth employee contribution accounts.
SECURE 2.0 Withdrawals
The SECURE 2.0 law adds several new in-service withdrawals that can be made from any 401(k) account. These are withdrawals for: federally-declared disaster expenses, terminal illness, victims of domestic abuse, and emergency expenses. (In-service withdrawals to pay for long-term care premiums become available in 2026.) These withdrawals can be taken at any age, but withdrawals for terminal illness are only available if the employee is otherwise eligible for a withdrawal (for example, because of financial hardship). Note that plans are not required to offer any of these SECURE 2.0 withdrawals.
Taxation
In-service withdrawals of pre-tax 401(k) funds are taxable and, if made before 59 ½, may be subject to penalty. A Roth 401(k) withdrawal that is a “qualified distribution” comes out completely tax-free. If not qualified, the earnings part of a Roth withdrawal is taxable under a pro-rata rule. The earnings portion of each withdrawal of non-Roth after-tax contributions is always taxable on a pro-rata basis.
https://irahelp.com/slottreport/what-are-the-rules-for-401k-in-service-withdrawals/