Data regarding the nephrotoxicity of sofosbuvir (SOF) remain controversial. We compared the evolution of estimated glomerular filtration rate (eGFR) in patients with chronic HCV infection receiving SOF-based or SOF-free direct-acting antivirals (DAAs). A total of 481 patients with compensated liver diseases and eGFR ≥30 ml/min/1.73m2, receiving SOF-based (n = 308) or SOF-free (n = 173) DAAs for 12 weeks, were prospectively enrolled. The eGFR was assessed from baseline to off-treatment week 24 using the chronic kidney disease (CKD)-epidemiology collaboration equation. Differences in the evolution of eGFR between regimens were compared by a generalized linear mixed-effects model. Multivariate analysis was performed for factors affecting eGFR evolution. Patients receiving SOF-based DAAs experienced a significant on-treatment decline in eGFR (adjusted slope coefficient difference: -1.24 ml/min/1.73m2/month; 95% CI -1.35 to -1.13; p <0.001) and a significant off-treatment improvement (adjusted slope coefficient difference: 0.14 ml/min/1.73m2/month; 95% CI 0.08 to 0.21; p = 0.004) compared to patients receiving SOF-free DAAs. Multivariate analysis showed age per 1-year increase (adjusted slope coefficient difference: -0.05 ml/min/1.73m2/month; 95% CI -0.05 to -0.04; p <0.001), SOF-based DAAs (adjusted slope coefficient difference: -0.33 ml/min/1.73m2/month; 95% CI -0.49 to -0.17; p <0.001), and CKD stage (adjusted slope coefficient difference: -1.44 ml/min/1.73m2/month; 95% CI -1.58 to -1.30; p <0.001 for stage 3 vs. 1, and -3.59 ml/min/1.73m2/month; 95% CI -3.88 to -3.30; p <0.001 for stage 2 vs. 1) were independent factors affecting eGFR evolution from baseline to off-treatment week 24. Patients receiving SOF-based DAAs exhibited a quadratic trend, with eGFR worsening on treatment and improving off treatment. Increasing age, SOF-based DAAs, and more advanced baseline CKD stage are independently associated with a decline in eGFR in patients with HCV receiving DAAs. While the efficacy of sofosbuvir for the treatment of hepatitis C virus is clear, data regarding its possible nephrotoxicity are controversial. Herein, we showed that sofosbuvir worsened on-treatment kidney function but led to an off-treatment improvement. Our findings suggest that treating physicians should be alert to risk factors for kidney dysfunction before initiating direct-acting antiviral treatment for patients with hepatitis C virus infection. NCT04047680. Copyright © 2019 European Association for the Study of the Liver. Published by Elsevier B.V. All rights reserved.