Taking a hardship withdrawal can be a costly endeavor. You will owe income tax on the amount you withdraw, unless you are withdrawing Roth contributions.