In this paper, dual-frequency GPS data recorded at Varanasi (geographic latitude 25°16' N, longitude 82°59' E) have been analyzed to study the ionospheric perturbations in total electron content (TEC) due to two recent major earthquakes (M>5.0) whose main shocks occurred on 25 February and 12 March 2010. A monthly median of the TEC and associated inter-quartile range, upper bound and lower bound are utilized as a reference to identify abnormal signals during these two earthquakes. The results show anomalous depletions in the TEC. These pre-earthquake ionospheric anomalies appear within 6 days prior to the earthquakes. We have also analyzed the ELF and VLF spectra observed from the DEMETER micro-satellite above the epicenter of the earthquake to support the ionospheric anomalies prior to the earthquakes. A possible mechanism responsible for the ionospheric anomalies due to earthquakes is also discussed.