Harleysville is located at 40°16'45" North, 75°23'13" West (40.279444, -75.387222).
According to the United States Census Bureau, the city has a total area of 4.17 mi2 (10.80 km2). 4.17 mi2 (10.79 km2) of it is land and 0.00 mi2 (0.01 km2) of it is covered by water. The total area is 0.11% water.
Harleysville is located in the Eastern Standard Time (EST) timezone, GMT-05:00. It observes Daylight Saving Time (DST).