The 27-year-old has put pen to paper on the new deal which includes an option to extend the contract for another year.
"Glenn has played a big part in our achievements since he came to the club and it is important to look after players who have been the bedrock of that success," said manager Tony Pulis.
The Republic of Ireland international said of signing the new deal: "I am loving life at the moment and things are going really well, so I am absolutely delighted to commit my long-term future to the club.
"I am very excited about what the next few years could have in store, and I am proud to be a part of it as we look to continue the Club's excellent progress."
Whelan joined the club from Sheffield Wednesday for £500,000 in 2008.