Whenever you ultimately make withdrawals from a conventional defined contribution strategy, you will need to spend normal earnings taxes around the cash you withdraw – whether or not the cash came out of your contributions, dividends or capital gains.
For conventional plans you'll owe earnings tax on all of your withdrawals – each the cash you contributed and also the gains in your contributions. Keep in mind: Cash you withdraw from a defined contribution strategy is usually taxed at your earnings tax price in the time you withdraw it. (The present leading earnings tax price is 35%, although it is feasible that the price might be changed down the road.)
Within the case of a Roth 401(k), you'll need to spend tax in your contributions, but you will not be taxed later whenever you make withdrawals.