Putting money into a 529 college savings plan is relatively easy. Getting it out can be tricky.

This may come as a surprise to the families who have piled money into accounts, hoping to reap tax and financial aid benefits.

"People get tripped up and don't realize it until it's too late," said consultant Deborah Fox of Fox College Funding in San Diego.

Assets in the plans topped $224 billion at the end of 2014, according to research firm Strategic Insight, up from about $13 billion in 2001.

Here are four traps that can keep clients from getting the most out of their accounts:

Competing Tax Benefits

Money in a 529 account grows tax-free if the proceeds are used for qualified educational expenses. But there are complications.

The biggest trap may be the rule against double dipping. You cannot use tax-free 529 money to pay for expenses that you use to claim tax credits, including the American Opportunity Credit and the Lifetime Learning Credit. Conversely, you cannot get the tuition and fees deduction on expenses you have paid with tax-free 529 money.

People often do not discover that they have incurred an unnecessary tax bill until they prepare their return, said Joseph Hurley, a certified public accountant and founder of the SavingForCollege site.

At that point, if you want the credits, which are typically more valuable than the tax savings from a 529 distribution, then you have to pay taxes (but not penalties) on at least part of the money you withdrew from the plan in the previous tax year.

Grandparents Help

Accounts owned by grandparents are not included in initial financial aid calculations. Sounds like a good thing, right?

Except that any withdrawals count heavily against the grandchild in the next year's aid calculations. Distributions from grandparent-owned accounts are considered untaxed income to the student, which means he or she could lose a big chunk of grants or scholarships: up to half the amount distributed.

By contrast, accounts owned by parents or students are considered parental assets. That means up to 5.64 percent of the account balance is included in financial aid calculations, but distributions are not.

A few workarounds exist, such as transferring the account to a parent if the plan allows or waiting to withdraw the money until Jan. 1 of the student's junior year. At that point, any withdrawals will not affect aid eligibility, which is based on the previous year's financial details.

Another solution could be gifting any money withdrawn to the parents. The Internal Revenue Service has not specifically blessed the move, Hurley said, but he does not see much risk from it if the account beneficiary incurs sufficient qualified expenses.

The Divorce Trap

A similar problem awaits divorced parents. Financial aid calculations typically are based on the income and assets of the parent with whom the child lives most of the time.

Non-custodial parent accounts typically are excluded from the first financial aid calculations, but distributions count as the student's income in later aid determinations.

A non-custodial parent can try the same workarounds as grandparents but may be leery about handing money to the ex rather than to the student or the school.

Timing Is Everything

You only get the tax break on 529 withdrawals if they match the amount of "qualified education expenses" in the same year.

If you withdraw money in December and pay the tuition bill in January, you may not have enough qualified expenses, and the excess distribution could be taxed and penalized.

Tax-free assistance like scholarships must be deducted from the expenses incurred.

What was paid for also matters. Tuition and books are fine, but computers do not count unless the school requires them.

Other costs not covered? Transportation and repayment of student loans.

Bottom line: Do not just call the 529 plan and tell them to send money to the school.

"It's very important to have a 529 withdrawal plan before you withdraw any money," Fox said. "You need to know all the ins and outs and how they will affect you."