William Anderson (April 7, 1822 – 1897) was an Ontario farmer and political figure. He represented Prince Edward in the 1st Parliament of Ontario as a Conservative member from 1870 to 1871.
He was born in Ameliasburgh Township in Upper Canada in 1822, the son of an Irish immigrant. He served in the local militia, becoming captain in 1855. Anderson was elected to the Legislative Assembly of the Province of Canada for Prince Edward in 1861; he was defeated in 1863. He was elected to the provincial legislature in an 1870 by-election after Absalom Greeley resigned his seat. He also served as the Grand Treasurer for the Orange Lodge of British North America. Anderson later served as reeve for the township and was warden for Prince Edward County in 1884.