Investing in stocks is a great way to grow wealth for the future. But savers are often advised to shift some of their assets away from stocks and into bonds once retirement rolls around.

The reason? Stocks are very volatile, and while keeping some stocks around during retirement is a smart move, seniors should also give themselves the option to tap their savings even when the market is down. Bond values are more apt to hold steady even during turbulent periods, and the interest payments they make can serve as a nice source of income for retirees.

In fact, municipal bonds are a great investment choice for seniors. These bonds are issued by states, cities, and other localities, as opposed to corporate bonds, which are issued by corporations to raise capital.

Senior person sitting in chair holding mug.

Image source: Getty Images.

There are a couple of things municipal bonds have going for them over corporate bonds. First, they're pretty low-risk. Bonds in general are a more stable investment than stocks, but municipal bonds have, historically speaking, been even less likely to default on their interest payments than corporate bonds.

Second, municipal bonds offer retirees the change to lower their tax burden at a time when that's so important. Municipal bond interest is always exempt from federal taxes. And seniors who buy bonds issued by their home states can avoid state and local taxes on those interest payments as well.

But as useful an investment as municipal bonds are, they're not perfect. In fact, there's one big drawback you should know about.

Social Security and Medicare surprises

Many seniors are shocked to learn that Social Security benefits are taxable once their income exceeds a certain threshold. But this may come as an even bigger surprise -- even though municipal bond interest is tax-free, it counts as income for determining whether you'll pay taxes on your Social Security benefits.

Meanwhile, seniors on Medicare pay a standard premium for Part B coverage that changes from year to year. Higher earners, however, pay a surcharge on top of that premium. And just as municipal bond interest counts as income for determining tax liabilities on Social Security, so too does it count as income for determining which seniors will pay more for Medicare Part B.

Don't get caught off guard

Even though municipal bond interest could bump some seniors into an income category where they're taxed on Social Security and liable for higher Medicare premiums, municipal bonds are still a good investment to hold in retirement. The key, however, is to understand the implication of owning them.

Once you're retired and on a fixed income, taxes can become even more of a burden than they were during your working years. It could benefit you to sit down with a tax professional before you retire and map out a strategy for keeping your IRS liability to a minimum. The last thing you need is a series of unpleasant tax surprises that cause you financial stress at a time when you deserve to be enjoying life.