Mechanicsburg is a village in Sangamon County, Illinois, United States. The population was 456 at the 2000 census. It is part of the Springfield, Illinois Metropolitan Statistical Area.
Mechanicsburg is located at 39°48′34″N 89°23′51″W / 39.80944°N 89.3975°W / 39.80944; -89.3975 (39.809366, -89.397445).
According to the United States Census Bureau, the village has a total area of 0.4 square miles (1.0 km²), all of it land.