The former Rangers and Scotland keeper will sign on as player-coach at Tynecastle when his current contract with Crystal Palace expires on July 1 and he is relishing the prospect of joining up with manager Robbie Neilson's revamped squad.
Hearts have been linked with a variety of goalkeepers since releasing Jamie MacDonald and Mark Ridgers last month and Alexander will be expected to provide the Gorgie club with a vastly experienced last line of defence as they battle it out with Rangers, Hibs and the rest of the Championship contenders for the one automatic promotion spot next season.
Alexander spent last season at Palace, where he managed just one appearance - a 2-1 defeat by Bristol City in the Capital One Cup. But, with nearly 250 matches for Cardiff City behind him and 90 appearances for Rangers, including the UEFA Cup final in 2008, the former Stenhousemuir, Livingston and Ipswich Town No.1 appears a shrewd signing for Hearts.
Alexander said: "As a boyhood Hearts fan, I am delighted to join a club. With the coaching side of it as well, this is a fantastic opportunity for me. At 36, I need to start looking to the future and want to get involved in coaching. It's an opportunity I just couldn't turn down.
"We have a young squad and if I can help bring on these kids, hopefully it will work well for us all."
Alexander may make his league debut for Hearts away to former club Rangers at Ibrox after the teams were paired in the opening-day matches released last week.