Reinvested dividends are subject to the same tax rules that apply to dividends you actually receive, so they are taxable unless you hold them in a tax-advantaged account.
Do I have to pay taxes on dividends if I reinvest them?
Generally, dividends earned on stocks or mutual funds are taxable for the year in which the dividend is paid to you, even if you reinvest your earnings.
How do I avoid paying tax on dividends?
Use tax-shielded accounts. If you're saving money for retirement, and don't want to pay taxes on dividends, consider opening a Roth IRA. You contribute already-taxed money to a Roth IRA. Once the money is in there, you don't have to pay taxes as long as you take it out in accordance with the rules.