The total electron content (TEC) derived from the global positioning system (GPS) at Varanasi (latitude 25.38 N, longitude 82.998 E), India has been measured during 2007 and 2010. We have chosen nine earthquakes (M 4 5) that occurred within 2000 km of Varanasi during 2007 and 2010 to study the changes in TEC associated with these earthquakes. A monthly median (MM) of the TEC and associated inter quartile range (IQR), upper bound (UB) and lower bound (LB) are utilized as a reference for identifying abnormal signals during all nine earthquakes. The results show anomalous reductions and enhancements in the TEC. These pre-earthquake ionospheric anomalies appear within 5 days prior to earthquakes. A possible mechanism responsible for ionospheric anomalies associated with earthquakes is discussed.