Millions of Americans carry student loans. If you're one of them and are struggling to keep up with your payments, or just plain sick of having them hanging over your head, then here's some potentially good news. Following the passing of the SECURE Act (which stands for Setting Every Community Up for Retirement), the scope of 529 plan withdrawals has been expanded to include student loans. And that could be a huge relief for borrowers.

How 529 plans work

A 529 plan is a tax-advantaged savings plan designed to help families sock away funds for education. 529s were originally designated for college expenses only, but following the Tax Cuts and Jobs Act of 2017, their reach was expanded to include private K-12 education, too. 

A lecture hall full of college students raising their hands while the professor speaks.

Image source: Getty Images

Contributions to 529 plans are made with after-tax dollars, like a Roth IRA, so there's no immediate tax break for funding one. But once your money is in a 529, you can invest it and not pay taxes on your investment gains year after year. And withdrawals are tax-free, as long as they're used for qualified education-related expenses. Some states also offer their own tax break for funding a 529.

Up until recently, one of the downsides of a 529 was that you couldn't use it to cover existing student debt. But now that the SECURE Act is in place, people with student loan debt can withdraw up to $10,000 tax-free to pay it down. 

That's a big deal for two reasons. First, if you're struggling to make your loan payments and your family has leftover funds in a 529, there's now an easy way for them to gift you that money. Additionally, the ability to withdraw funds to pay off student debt takes away part of the risk associated with 529s.

One thing to be aware of with 529s is that you'll pay taxes on any money you withdraw for non-qualified expenses, which is a problem if you're left with excess funds in your account. You'll also face a 10% penalty, though that penalty only applies to the gains portion of the sum you withdraw, and not your principal contribution. By allowing for tax- and penalty-free withdrawals for student loan payoff purposes, 529 plans just got a lot more flexible -- and a lot more attractive. 

Keep in mind that the $10,000 you can remove to pay off existing loans is a lifetime limit per borrower. If your parents, for example, have $20,000 left over in a 529, they can give you $10,000 of that to pay off your loans, but not the remaining $10,000. However, if you have a sibling with student loan debt, your parents could give you $10,000 to pay down your loans, and also give your sibling $10,000 to do the same. 

It pays to save in a 529

Families intent on paying for their children's college now have even more incentives than ever to open a 529. Not all plans are created equal, though. Each state sponsors its own 529, but different plans offer different investment choices and associated fees. It pays to compare plan ratings, especially as you don't need to save in your home state's 529 -- you can open one from any state. Be sure to compare plan features and performance to see which 529 could be the right choice for you.