Spartansburg is a borough in Crawford County, in northwestern Pennsylvania, United States. The population was 277 at the 2020 census, down from 305 at the 2010 census.