Nils Peter Hamberg (4 November 1815 in Stockholm – 13 February 1902) was a Swedish pharmacist and physician. He started teaching chemistry in 1861 and later on became a forensic chemist. Hamburg was the older brother to the missionary Knut Theodor Hamberg (1819–1854).
Hamberg was the son of sea captain Nicholas Hamberg (1785–1830) and his wife Magdalena Lovisa, born Löfvenberg, (1791–1863). In 1830 Hamberg became a pharmacist apprentice at the pharmacy Gripen in Stockholm, in 1834 he passed the pharmaceutical entrance exams, and in 1838 he graduated as a pharmacist. In spring 1839 Hamburg bought the pharmacy Hjorten at Kungsholmen in Stockholm, which he ran until April 1850. At the same time he studied medicine and disputated 1848 for the doctorate of medicine under Göran Wahlenberg, professor in botanics at Uppsala university.
The thesis had the title "Om vegetabiliska droguers insamling och förvaring" (About collection and storage of drugs from plants) and built on the collection of drugs from plant that Hamberg had done from 1843-1847. Interested pharmacists could buy a sample of the collection of drugs that Hamberg had created, which consisted of 337 samples and a couple synthetic.
From 1848-1854, Hamberg taught in chemistry and pharmacy at Karolinska Institutet and also worked as a physician. 1851 Hamberg was granted a travel scholarship by the state and went on a study journey to Germany, Belgium and Great Britain to study physiological and pathological chemistry, it lasted until September 1852. He also got the chance to visit the great world exhibition in London, which he reported from on his homecoming. During his travels he collected collectibles which resulted in a private museum, Stockholms museum for natural science, slöjd and art. This existed from 1854 until 1864, whereupon the collections where disbanded.
Another result of the trip was that Hamberg, after foreign models, 1855 established a private chemical laboratory in the Keyserska house at Tegelbacken in Stockholm.
Hamberg was a member of the Royal Swedish Academy of Sciences from 1878.