All withdrawals from your 401(k) are taxable.
They are also subject to a 10% early withdrawal penalty if you are younger than 59 1/2.
There are exceptions for this penalty, none exactly for hardship.
Please read this TurboTax Help article for more information.