Using foreign stocks to diversify your portfolio can be a good move for investors looking to collect dividends and protect capital. But owners of dividend paying foreign stocks can find themselves being hit by another type of tax: foreign dividend withholding tax.

Keeping as much of your dividends as possible is key to making sure you have the most possible cash to reinvest or supplement your income. But dividend withholding taxes from foreign countries can eat up part of your dividends before they even get to you.

However, there are ways to avoid these taxes and minimize the damage to your portfolio.

An alarm clock sits atop wooden blocks spelling out "TAX."

Image source: Getty Images.

Countries without dividend withholding tax
One of the best ways to avoid dividend withholding tax is to invest in countries without such a tax. Among the countries that don't withhold foreign investors' dividends are Hong Kong, India, Singapore, and the United Kingdom.

There is always a risk that these tax policies could change as these countries look for additional revenue but for now they allow U.S. residents to easily avoid dividend withholding taxes.

Retirement account exemptions
While holding foreign dividend stocks in an IRA is often a bad idea since a foreign tax credit cannot be claimed (see below for more on this), there are some situations where IRAs do have an advantage.

In the case of Canadian dividend withholding tax, U.S. investors can avoid the tax by holding shares in an IRA or 401(k). This makes Canadian dividends stocks one of the best tax-positioned investments for investors looking to put international investments in their retirement account. U.S. investors may be particularly interested in large Canadian banks for both this tax position and their higher dividend yields compared to similar U.S. banks.

 Since the primary benefit of an IRA is tax savings, optimizing dividend investment holdings in these accounts is important to realizing the full benefit of an IRA.

Choosing the rights shares
Most companies only have one country that's treated as their tax home, but some companies offer their investors multiple classes of shares with different tax domiciles. Royal Dutch Shell is one example with Royal Dutch Shell Class A Shares (NYSE:RDS.A) being hit with a 15% Dutch dividend withholding tax and Royal Dutch Shell Class B Shares (NYSE:RDS.B) taking advantage of the U.K.'s 0% dividend withholding tax.

For investors holding shares in an IRA this can make the difference between a 15% tax rate and getting your dividend tax free. However, the market has already partially priced this difference in as the Class B shares trade at a premium of almost 5% over their Class A counterparts. When calculating which investment is best for your portfolio, be sure to take both taxes and share price premiums into account.

Scrip vs. cash
In some cases, dividend withholding tax can be avoided by taking additional shares as a dividend payment instead of cash. This is the case for Spanish banking group Banco Santander (NYSE:SAN).

While the cash dividend is hit with a 21% dividend withholding tax, those who opt for the scrip dividend avoid the tax by accepting additional Banco Santander shares. For foreign companies that offer this option, it is definitely worth researching whether accepting shares as payment can cut your tax bill.

Tax forms littered with calculators, pens, and sticky notes.

Image source: Getty Images.

Recovering the tax
In many cases, at least a portion of foreign dividend withholding tax can be recovered. To avoid double taxation, the IRS allows taxpayers to claim either a deduction or a credit on their tax returns to make up for some of their foreign taxes.

In many cases, if you have less than $300 ($600 if filing a joint return) in qualified foreign taxes, the IRS lets you claim the credit on your 1040 without further effort. But above this amount, you will usually also need to file Form 1116. For help in this area, any reputable tax professional should be able to take care of it.

However, shares held in IRAs are not eligible for this tax recovery and investors should consider this when deciding what to put in their IRA.

Tax treaty savings
Although investors don't like them, dividend withholding taxes do have a purpose. When dividends are paid to individuals inside the country's borders, the home country can tax the dividends and these dividends are typically put to use in the home country's economy. But when dividends leave the country and go to foreign shareholders, the home country could neither tax nor keep part of the dividends at home if it did not have a withholding tax.

However, dividend withholding taxes have their downsides as well. By collecting more of the dividends as taxes, foreign investors may choose to look elsewhere for greater returns. This can mean less foreign investment cash and a less prominent role in world trade.

Tax treaties come part of the way toward solving these problems by getting agreeing countries to offer a reduced tax rate to each other's investors in an effort to promote mutual investment. Dividends from Canada are one example whereby the normal Canadian dividend withholding tax rate of 25% is reduced to 15% for U.S. investors.

When researching which foreign dividend stocks to buy, investors should see whether a tax treaty could play a role in reducing their dividend withholding tax.

Tax efficiency
Saving on taxes is key to maximizing how much of your dividends you can keep and enjoy. While qualified dividends receive a tax advantaged position in the U.S. tax code, foreign dividends are often hit with higher tax rates. So before making a foreign dividend investment make sure to consider all aspects and consult a reputable tax professional.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.