See your CPA about this. Tax law regarding 401ks is evry complex and it's usually a very bad idea to make early withdrawals.
An additional 10% early distribution penalty tax gets assessed if you aren't at least age 59 ½ when you take your distribution. Several exceptions to this penalty include:
•You die and the account is paid to your beneficiary
•You become disabled
•You terminate employment and are at least 55 years old
•You withdraw an amount less than is allowable as a medical expense deduction
•You begin substantially equal periodic payments
•Your withdrawal is related to a qualified domestic relations order
In addition to penalties and taxes due on a 401K early withdrawal, you lose all the potential future investment growth of that retirement plan money. Furthermore, since there are annual limits to the amount you can contribute to a 401K plan, you can’t make up for a previous withdrawal later, even when you are on more solid financial ground.
Although 401K loans have their own significant drawbacks, consider a 401K loan if you are in a financial pinch and the only option appears to be your retirement money. A 401K loan should be preferable to an outright 401K withdrawal.
PLEASE READ THIS BEFORE YOU COMMENT, EMAIL ME OR PHONE ME. I'm only licensed in CA. This answer doesn't make me your lawyer, and neither do follow-up comments and/or emails and/or phone calls, and you shouldn't expect me to respond to your further questions if you haven't hired me. We need an actual agreement confirmed in writing before any attorney-client relationship is formed. This answer doesn't constitute legal advice, and shouldn't be relied on, since each state has different laws, each situation is fact specific, and it is impossible to evaluate a legal problem without a comprehensive consultation and review of all the facts and documents at issue.