Many investors like bonds because they offer an opportunity to generate a steady income stream without the same degree of risk that has come to characterize the stock market. But not all bonds are created equal, and if you're looking to add some to your portfolio, you may want to consider corporate bonds as well as municipal bonds. A corporate bond is a debt instrument issued by a company to raise capital, while a municipal bond is a bond issued by a city, town, or state to raise money for public projects. Though municipal bond interest carries certain tax exemptions, corporate bond interest is always taxed. Corporate bonds, however, typically offer higher yields in return.

Image source: Getty Images.

Corporate bonds

Corporate bonds are those issued by large companies to raise capital for things like market research, development, and expansion. When a company issues bonds, it agrees to pay its bondholders a certain amount of interest over a preset period of time and then repay their principal investments at a predetermined date. As an investor, you can make money by collecting those interest payments for as long as you hold your bonds. However, those interest payments will be subject to taxes. This means that if you buy corporate bonds paying $800 in interest annually and your effective tax rate is 25%, you'll lose $200 of that income to taxes.

Municipal bonds

Municipal bonds are those issued by localities to fund public projects like roadways, hospital systems, and schools. Municipal bonds come in two varieties: general obligation and revenue. General obligation bonds are used to fund projects that don't generate income, like parks and playgrounds. They're backed by the full faith and credit of the issuing municipality, which means that the issuer can do whatever it takes, including raising taxes, to make payments on those bonds. Revenue bonds, meanwhile, are backed by the specific income they're designed to generate. For example, a city might issue revenue bonds to build a new bridge and use the money it collects in tolls to make payments to bondholders.

As is the case with corporate bonds, you can make money from municipal bonds by collecting regular interest payments. Unlike corporate bonds, however, those payments will never be subject to taxes at the federal level. Furthermore, if you buy bonds issued by your home state, you won't pay state or local taxes, either. This means that if you buy municipal bonds issued by your home state paying $800 interest annually, you'll get to keep that $800 in full.

Which option is right for you?

Though there's no such thing as a risk-free investment, bonds are considered to be a relatively safe bet. That said, municipal bonds have proven to be even less risky than corporate bonds. In fact, based on historical data, municipal bonds are 50 to 100 times less likely to default than corporate bonds with the same credit ratings. If you're particularly risk-averse, you might consider municipal bonds for their extremely low default rate.

Another benefit of municipal bonds over corporate bonds is the ability to collect tax-free interest payments. If you're in a high tax bracket, municipal bonds can be a good way to generate income without increasing your tax burden.

The flip side, however, is that municipal bond yields tend to be lower than those of comparably rated corporate bonds, and sometimes, you'll actually come out ahead by making more money on interest but forking over a portion of that income to taxes. To compare a municipal bond's tax-free interest with a corporate bond's taxable interest, you can use this tool to calculate your tax-equivalent yield.

One final thing to consider about both bonds is the purpose behind them. Corporations issue bonds to ultimately become more profitable, whereas municipalities issue bonds for the purpose of public improvement. If you're looking to make a difference in your community, you might consider investing in municipal bonds that are issued to update schools or improve the local hospital system.

Whether you decide to invest in corporate bonds or municipal bonds, remember that stocks have outperformed both options over time. If you're looking for a more efficient way to grow your wealth, stocks might be a better idea altogether. But if your goal is to generate a reliable stream of income without taking on the risk of the stock market, both corporate and municipal bonds could help you achieve that objective.

This article is part of The Motley Fool's Knowledge Center, which was created based on the collected wisdom of a fantastic community of investors. We'd love to hear your questions, thoughts, and opinions on the Knowledge Center in general or this page in particular. Your input will help us help the world invest, better! Email us at knowledgecenter@fool.com. Thanks -- and Fool on!

The Motley Fool has a disclosure policy.