Corfe Castle is a village and civil parish in the English county of Dorset. It is the site of a ruined castle of the same name. The village and castle stand over a gap in the Purbeck Hills on the route between Wareham and Swanage. The village lies in the gap below the castle and is around south-east of Wareham, and north-northwest of Swanage. Both the main A351 road from Lytchett Minster to Swanage and the Swanage Railway thread their way through the gap and the village.