Chile international Fernandez has extended his deal until June 30, 2018, while Alonso has agreed a new five-year contract until 2021.
The wing-back has established himself as a key component of Paulo Sousa's side and has only missed three Serie A matches so far this season.
Fernandez has faced more of a battle for first-team football this term, particularly given the emergence of Matias Vecino, but has impressed during his 15 appearances this term in all competitions.
Fiorentina, who were comfortable 3-1 winners away to Palermo on Wednesday, are just a point behind Inter after 18 rounds of Serie A.