Sir William Dunbar, 7th Baronet

Sir William Dunbar, 7th Baronet (2 March 1812 – 18 December 1889) was a Scottish Liberal Member of Parliament in the British House of Commons. He became the 7th Baronet on 22 June 1841.
He was educated at the University of Edinburgh. He became a member of the Faculty of Advocates in 1835, but did not practise law.
In 1850 he was living at 47 Heriot Row in central Edinburgh.
He was appointed a Lord of the Treasury in 1859. He became Keeper of the Privy Seal to the Prince of Wales. Dunbar left Parliament in 1865 to become Commissioner for Auditing Public Accounts. He was Comptroller and Auditor General 1867–1888.
He represented Wigtown Burghs 1857–1865.