Alnwick was a free agent after leaving Leyton Orient by mutual consent in March.
The 27-year-old has 82 professional appearances and lists Spurs among his former clubs, after they paid Sunderland £900,000 for him in 2007.
Posh manager Darren Ferguson told the club's official website: "I am really pleased to get him. He has got vast experience, has played at the top level and there were a lot of clubs looking at him.
"He is a good goalkeeper, good size and is excellent with his feet, which is what I am looking for; someone who can play from the back.
"We are delighted to get him on board, we feel with his quality and experience he will make a big difference to us. Jimmy Walker, our goalkeeping coach, has worked with him at Spurs and Gary Breen played with him up at Sunderland and both spoke very highly of him.
"He is very focussed, he realises he needs to get his career up to speed and the fact he has signed a three-year contract means he has a bit of stability. He can get settled in.
"He is a good age, he is 27, so should be coming up to his peak. I know he is delighted to be joining, he believes we are the right club for him."
Alnwick will go straight into the squad for the club's pre-season friendly with Brighton on Saturday and he becomes Posh's second signing of the day, after they secured the signature of defender Michael Smith.