Today, Deva Dalporto is a YouTube star, racking up millions of page views with videos parodying hit songs. But before Dalporto became a viral sensation, she was a struggling actress -- one who cashed out her 401(k) to help support her dream.

"At the time, it was a lifeline. I was young. I took a chance," she said.

Dalporto is far from alone. A recent survey of more than 27,000 Americans by the FINRA Investor Education Foundation found that one in 10 have taken what are known as "hardship withdrawals" from their retirement accounts.

But withdrawing money early from your 401(k) can come with serious financial consequences. If you're considering cashing out all or part of your account, here are a few things to consider before you make that jump.

Person smashing piggy bank with hammer

Image source: Getty Images.

You'll need to check your eligibility with your employer

Your employer sets specific criteria to determine what financial needs make an employee eligible to make hardship withdrawals from a 401(k) account. For instance, one plan may consider a medical expense to be a hardship, but not payment of college tuition.

You'll face income taxes

When you take a distribution from a traditional 401(k) -- whether you do it before you reach retirement age or not -- you are required to pay income taxes on your withdrawal.

The rules for Roth 401(k)s are a little different. Those making early withdrawals won't be taxed on the principal in their accounts, but they could be taxed on the investment earnings accumulated in their accounts. (Those taking "qualified" Roth 401(k) withdrawals -- withdrawals taken after retirement age -- won't be taxed on earnings.)

You could face a tax penalty

Early withdrawals from retirement accounts, including 401(k)s, are generally subject to a 10% penalty on top of regular income taxes.

Jane Wesby, a New Jersey resident who used her 401(k) to stay afloat after a 2008 job loss, estimates she paid some $50,000 in taxes and tax penalties. "It was a huge tax penalty," she said, "but I had no choice."

There are, however, a few exceptions to the tax penalty, including unreimbursed medical expenses or permanent disability of the account owner. A complete list of penalty exceptions is available from the IRS here.

You may have to wait before resuming 401(K) contributions

Companies often prohibit employees who have taken hardship withdrawals from making new 401(k) contributions for at least six months.

You may be missing out on thousands of dollars (or more) in retirement account growth

The longer you contribute money to a retirement account, the more likely you are to see that money grow, thanks largely to the power of tax-deferred compounding.

For example, if you were to contribute $1,000 a year for 20 years to an investment account with an average annual return of 8%, you'd end up with a balance of nearly $50,000 after contributing just $20,000 in total, according to FINRA's savings calculator.

Taking a hardship withdrawal not only temporarily halts regular contributions, but also permanently reduces your account balance, thus setting back the compounding process. And if your employer offers a 401(k) match, you will likely also forgo that "free money" (and the compounding on it), too.

Experts agree that hardship withdrawals should be a last resort and that, ideally, investors should have emergency savings accounts that help them weather tough times. (Learn more about establishing an emergency savings account here.)

If you don't have an emergency savings account in place before hardship strikes but you do have a regular source of income, you may have other options, such as taking out a loan from your 401(k). While such a loan could hamper retirement account growth, borrowers may avoid the stiff tax penalties associated with a hardship withdrawal.

An Alert Investor is a smarter investor.