Heidelberg is a borough located southwest of Pittsburgh in Allegheny County, Pennsylvania, United States. The population was 1,288 at the 2020 census. The borough was named after Heidelberg in Germany, the native home of a large share of the early settlers.