Khanpur Mahar is a city in Tehsil Khangarh Sharif, Ghotki District, in the Sindh province of Pakistan. It is the largest city in Ghotki District by area.
The city is an agricultural hub and an important economic centre for sugarcane and cotton crops. The surrounding land is very fertile, also producing wheat and rice. To the west, the Qadirpur gas field is one of Pakistan's largest onshore producers, and a major employer in the area.
Khanpur Mahar has hot weather for most of the year, with winter lasting only about three months.