Not all plans allow nondeductible 401(k) contributions, but if yours does, you must understand how the government handles these withdrawals. If you're converting only some of your savings, the government looks at the proportion of nondeductible versus deductible contributions and taxes you accordingly.
For instance, let's say you have $100,000 in your 401(k), $10,000 of which is nondeductible contributions. If you wanted to convert $10,000 to a Roth IRA, only 10% of the converted amount, or $1,000, would be considered nondeductible contributions since only 10% of your total 401(k) contributions were nondeductible.
If you decide to roll over your entire 401(k) balance, you can roll all your pre-tax dollars into a traditional IRA and all your nondeductible contributions into a Roth IRA. You wouldn't pay taxes on this type of conversion because you already paid taxes on your nondeductible contributions the year you made them.