Borrowing from a 401K can be risky. If you leave (or lose) your job, you must repay the balance due or pay taxes and possibly penalties. While you pay back the loan, the funds in your 401K are moved into low-risk funds and won't participate in any stock market appreciation.
If you borrow from your 401K, you have a specified amount of time to return the money to the account without penalty. If you do not return the money within the specified time, you will be taxed on the income on the next year's federal income tax return and you will receive a 1099 for the money that you received.
Borrowing from a 401(k) is sometimes a life-saver, but you need to realize that it is a short-term solution. You must repay the loan or face horrible tax consequences. Also, it will obviously reduce how much you have in your 401(k) until it is repaid.
There is a ten percent penalty for early withdrawal and the amount withdrawn is considered taxable income in the year taken out. 30 percent for taxes might be enough.
Borrowing money from your 401k is not usually smart because it comes with a huge pre-penalty fine, usually about twenty percent. A better option is to take a loan against it and pay it back over 1-5 years. If you were unable to pay back the loan your portfolio would be reduced by that amount.