William Hammer (31 July 1821 – 9 May 1889) was a Danish artist who specialized in painting still lifes of flowers and fruits.
Born in Copenhagen, he was the son of Johanne (née Bistrup) and Peder Pedersen Hammer. His elder brother, Hans Jørgen Hammer (1815–1882), was also a painter.
He studied at the Royal Danish Academy of Fine Arts from 1833 to 1839. In 1853, he was awarded the Neuhausen Prize and the same year received the Academy's travel support, which was renewed the following year. After visiting France, Germany and Italy he was back home in 1855. In 1860, he was awarded the Thorvaldsen Medal for his painting Korn og frugter under et æbletræ (National Gallery of Denmark). Hammer participated in the decoration of rooms in the Thorvaldsen Museum under the leadership of Michael Gottlieb Bindesbøll. In 1871, he became a member of the Royal Academy.
In later life he travelled to Italy to investigate archaeological finds. He was an avid collector of antiquities, especially Greek clay lamps. This resulted in the publication of his book Om de antike lerlamper (Copenhagen: G.C. Ursin. 1887).
In 1853, Hammer was married to Juliette Quintilia Friedenburg (1821-1898). He died at the Copenhagen Municipal Hospital during 1889 and was buried at Assistens Cemetery.