The 32-year-old, who has scored nearly 14,000 First Class runs for the county, made the announcement at a Testimonial lunch today (Tuesday).
Hildreth currently stands fourth on the all-time list of Somerset century makers having made his 37th hundred for the club in last season's final game against Nottinghamshire - the right-hander is 10 behind Sir Vivian Richards and 12 behind joint-leaders Marcus Trescothick and Harold Gimblett.
Speaking about his new deal, Hildreth said: “I’m delighted to have committed my future to Somerset. I love playing for the club and honestly can’t imagine playing anywhere else.
"The next few years look like they are going to be really exciting for Somerset and I’m thrilled that I’ll be a part of that.
"I hope that I’ll be able to contribute to a lot of Somerset wins over the next four years, but as one of the more senior players I’m also looking forward to being able to give the younger guys any help that they might need.”
Somerset Director of Cricket Matt Maynard said: “Hildy is an outstanding professional and epitomises everything that this club is about.
"The way he goes about his business is first class and he’s a very tough individual as was evident last year when he played on with a fractured ankle. He still has a tremendous amount to offer this club.”