Still, if you have urgent legitimate spending needs or high-cost debt you want to erase, tapping your 401k might make sense. Although a few retirement plans charge interest rates of 10% or more on loans, the most common rate is currently just 4.25% -- compared with 11% on personal bank loans and 13.4% on credit cards, according to the Federal Reserve.

Even Utkus has borrowed from his 401k. "I've used it for cars, I've used it for housing improvements," he says.

From your portfolio's perspective, taking out a 401k loan is like adding a bond position: You are plunking down a chunk of cash in order to receive a steady stream of interest income. The difference is that the interest comes out of your paycheck, rather than from the issuer of the bond.

'Take only the minimum'

Borrowing from your 401k at 4.25% to pay down credit card debt at 13.4% gives you a return of more than 9%, points out Hess of Aon Hewitt, even if stocks or bonds go down in value. That return is virtually risk-free, unless you leave your job before you have paid off the loan.

Say you borrow $10,000 from your 401k at 4.25% for a one-year loan to pay down a credit card balance carrying an interest rate of 13.4%. If you had left the money intact in your 401k, you might have earned a 5% return on a 50/50 mix of stock and bond funds, giving you $10,500 after a year. With the loan, your interest payments go back into your 401k, so when it matures in a year you will have returned $10,425 to yourself.

In exchange, you have not only eliminated $1,340 in credit-card interest charges but also prevented them from continuing to mushroom. Here, taxes don't matter, since paying off either loan requires after-tax dollars.

Click here to become a fan of MSN Money on Facebook

If this is making sense to you, please remember: Debt is always risky. And this debt carries the extra risk that you could have to pay it off at the very time when you aren't earning a salary. If you leave or lose your job, you must have a feasible means of immediately paying off the loan.

"Take only the minimum you need, not the maximum you can get," says Hess.

Your loan should fund an asset of enduring value, advises Madrian: "If you have to leave your job, you can't sell the vacation to pay off your loan." Don't take a loan of last resort to splurge at a resort.

This article was reported by Jason Zweig for The Wall Street Journal.