You've been working hard in your career and setting aside money for the future. In some cases, you may have spent years building your 401(k) assets, where you have enjoyed tax-deferred growth on your investments. That's why, when you are switching jobs, one of the first things on your to-do list should be figuring out what to do with your 401(k). Here are three good options you should consider, as well as some common pitfalls you may encounter along the way.

401k letters and piggy bank.

IMAGE SOURCE: GETTY IMAGES.

1. Roll it over to an IRA

Your first choice is to do a direct rollover to an IRA at any discount brokerage firm. You can do this with a traditional or Roth 401(k), and your 401(k) account will retain its same tax treatment when it is rolled to an IRA.

One reason why this may be a smart move is that an IRA makes a nearly unlimited variety of investments available to you, allowing you greater control over your portfolio allocation and the fees you pay. In a 401(k), you're limited to the investment menu offered by your plan provider.

A direct transfer is a fairly straightforward process in which your 401(k) provider sends a check directly to your brokerage firm, which then funnels those funds into your new IRA. If, however, you elect to receive a check payable to yourself with the intention of depositing it into an IRA, the process can be tricky.

First, you will have a 60-day window in which to deposit that check in full into an IRA. Not only that, but if your previous employer withheld 20% for tax purposes, as employers are sometimes required to do, you will still need to deposit the entire original rollover amount into an IRA -- so you will have to come up with that missing 20% yourself. Assuming you successfully initiate and complete the rollover, you should get your 20% back at tax time.

Failing to follow any of these procedures can result in essentially a loss of your retirement tax shelter, as the IRS may deem this as a distribution of your tax-deferred retirement funds and not as a rollover. Therefore, you would most likely owe income taxes on the amount, and if you are under age 59-1/2 and do not meet any of the early-withdrawal exceptions, you would also owe a 10% penalty. So if you choose to do an indirect transfer, instead of a direct transfer as mentioned above, it's critical that you get it right.

 2. Roll it into your new 401(k)

A second good option is to check with your new employer to see if you can roll your old 401(k) into your new workplace retirement plan. That allows you to keep the 401(k) savings vehicle, which comes with unlimited creditor protection. Of course, you will then be limited to the investment choices of the new plan, but at least you will know where your money is, and it can be easier to keep track of. You should also consider the fees and expenses associated with your new 401(k) and the investments offered.

3. Leave it where it is

If the money you have within your old 401(k) is invested in a low-cost, diversified portfolio, and you're happy keeping it right where it is, then that's a perfectly valid option. However, keep in mind that if your balance is below $5,000, you may not be allowed to leave it in the old plan.

When thinking about how much you have saved in retirement assets and your overall investment strategy, you need to consider all of your accounts as belonging to one portfolio. Leaving behind multiple old 401(k)s in various plans with limited investment choices can make it difficult to manage your money as a whole. Whether you roll your money over to an IRA or another 401(k) or choose to leave it with your former employer, the idea is that you are shielding your money from taxes for as long as possible and staying on top of where some of your most important money is.