The destructive Mw = 7.8 Nepal earthquake happened in Nepal Himalaya, 80 km NW of Kathmandu city on 25 April 2015. A number of aftershocks in which one of them is Mw = 7.3 which occurred on 12 May 2015 are observed around the Kathmandu city of Nepal. In this paper, strong motion data of Nepal earthquake and its eight aftershocks having magnitude range 5.3–7.3, recorded at Kathmandu station is used to determine site effects and attenuation factor. Kathmandu city, capital of Nepal, is situated in a valley which consists of sediments of more than 300 m depth. Hence strong motion data recorded at Kathmandu station is strongly affected by site effect and anelastic attenuation. In this work, S-phase spectra recorded at Kathmandu station are corrected for site effect and anelastic attenuation to compute the source parameters of the events. The site effects and anelastic attenuation are estimated from inversion of strong motion data by using the inversion technique suggested by Joshi (Bull Seismol Soc Am 96:2165–2180, 2006a). The shear wave quality factor (Q β (f)) is computed at Kathmandu station by using the inversion scheme as Q β (f) = 68f0.58. The site effects and attenuation factor obtained by inversion technique are used to correct the spectrum for site effect and anelastic attenuation. The corrected source spectrum is compared with theoretical (Brune in J Geophys Res 78:4997–5009, 1970) spectrum to estimate various source parameters. Both horizontal component (North–South and East–West) are utilized to estimate the source parameters of 25 April 2015 Mw = 7.8 Nepal earthquake and its aftershocks. The best-fit theoretical spectrum provides final values of source parameters, i.e., stress drop, seismic moment, and source radius as 48.7 bars, 5.96 × 1027 dyne cm and 37.75 km, respectively, for the 25 April 2015 Mw = 7.8 earthquake and 1.40 × 1027 dyne cm, 44.7 bars, and 23.90 km, respectively, for the 12 May 2015 Mw = 7.3 earthquake.