William Shaler (1773 – March 29, 1833) was an American government official who served as a diplomat and confidential agent in several foreign locations, including Algiers, Mexico and Cuba.