Will my 10% 401k early withdraw penalty be able to be taken out of my Federal Tax refund?

For example: If I took an early withdraw of $5,000 from my 401k and paid the appropriate taxes at time of withdraw, but still owed the $500 10% early withdraw fee, will TurboTax be able to withhold that from my federal tax return? So If I was due to get a $1000 tax return, I would be able to pay that fee with the $1000 return and only receive $500? Or would I need to pay that separately out of pocket?