Let's start by looking at the main reason investors use 529 plans to save for college in the first place: the tax advantages. Contributions to a 529 are not deductible on federal income taxes. But earnings on that money grow tax-free, and there's no tax on distributions as long as they're used for eligible college expenses. Plus, many states offer income tax deductions on contributions made to in-state 529 plans.
The other important tax wrinkle to keep in mind if taking nonqualified 529 distributions involves any state income tax deductions you may have received for contributing to the plan. Many states offer residents such tax breaks for contributions made to an in-state plan, but they may also apply a clawback provision to recapture those unpaid taxes if the contributions aren't used as intended. That means for a nonqualified 529 distribution, you could be required to pay state income taxes on the contribution portion and not just on earnings.