Education

You would have to separate your cost basis in the account from the earnings in the account. The earnings is taxed at your tax bracket and a 10% penalty would be applied to that portion of the withdrawal. 

There are exceptions if the beneficiary is disabled and can’t attend school. 

I believe TDAmeritrade accepts ESA accounts.