William II of Bavaria (5 April 1365—31 May 1417) was Duke of Bavaria-Straubing and count of Holland (listed as William VI), Hainaut (listed as William IV) and Zeeland. He ruled from 1404 until 1417, when he died from an infection caused by a dog bite.