Sparta is a city in Randolph County, Illinois, United States. The population was 4,095 at the 2020 census. It has a total area of 11.443 square miles (29.64 km2), of which 11.17 square miles (28.93 km2) is land and 0.273 square miles (0.71 km2) is water.