If your 529 withdrawals exceed your costs, you would face taxes on the excess distribution and a 10% withdrawal penalty.
Your thinking that if your careful this won't happen. But if you are not careful you could be tripped up by the double dipping rule.
Here's the problem: The government will punish you if you try to claim the American Opportunity, Hope or Lifetime Learning education tax credits for the same expenses that you pay with the cash from your 529 plan or Coverdell Education Savings Account.
Why the double-dipping rule? You are already enjoying a tax benefit via Uncle Sam when you pull tax-free money out of a 529 or Coverdell. The government doesn't want you to get yet another tax freebie for the same cash.
Before you try pulling money out of a 529 plan or Coverdell, consult your accountant or IRS Publication 970: Tax Benefits for Education.