Dobczyce received its Magdeburg rights town charter probably in 1310, during the reign of Władysław Łokietek. The town was famous for its castle, where Jan Długosz liked to stay and work on his chronicles. Here, in 1450, Polish astronomer and dean of Kraków Academy Leonard Vitreatoris (Leonhard von Dobschütz) was born. Dobczyce enjoyed several royal privileges, allowing its residents to buy salt from nearby Wieliczka. The town was a local center of cloth and wool making, but the period of prosperity ended during the Swedish invasion of Poland (1655–1660). After the Partitions of Poland, Dobczyce was annexed by the Habsburg Empire, and from 1772 to 1918 belonged to Galicia. On the main square there is a 19th-century parish church.