Transferring funds from a 401K to a Roth IRA is legal, but it comes with tax implications. When making the switch, it's crucial to understand that you'll owe taxes on the amount rolled over, as traditional 401K contributions are tax-free. Planning for this tax liability is essential to enjoy tax-free withdrawals in retirement.