Withdrawal rules
Traditional 401(k)s and Roth 401(k)s both have a 10% early withdrawal penalty for withdrawals made before age 59 1/2. You also pay income taxes on the withdrawal. While they have that in common, there are key differences in 401(k) withdrawal rules.
When you have a Roth 401(k), you can withdraw your own contributions without an early withdrawal penalty. Let's say you've contributed $25,000 of your own money to a Roth 401(k), and your investments have gained $10,000, for a total balance of $35,000. You could withdraw your $25,000 in contributions penalty-free, but not the $10,000 in earnings. However, you can't take any withdrawals from a Roth 401(k) in the first five years without paying a penalty and taxes.