Education

You are not allowed to take a "Principal only" Withdrawal (distribution).  Every distribution is part earnings (box 2 of the 1099-Q) and Basis (principal) (box 3).  The earnings portion is subject to tax and 10% penalty.

 

Only if the account never earned any money or shows a loss, there will be 0 in box 2 of the 1099-Q and nothing will be taxed and there will be no penalty.

 

You may be thinking of a Roth IRA, where you are allowed to withdraw your contributions (principal) tax and penalty free.