Financial terms were not released. The 29-year-old defenseman could have been an unrestricted agent for the first time July 1.
"I'm super excited to continue my journey with the Sharks," Karlsson said. "Since my first day here, I have only good things to say about the people, organization and the fans. The entire Bay Area has been extremely welcoming to me and my family. I appreciate that, and we can't wait to spend the next eight years in San Jose.
"As far as hockey goes, I'm excited to continue the chase for the ultimate prize: the Stanley Cup. Last year was an unbelievable run but we didn't achieve what we set out to do. But the dedication I witnessed from my teammates, coaches, staff and organization showed me that we all have a great future ahead of us, and that we are capable of fighting for that championship year in and year out."
RELATED: [Karlsson, Sharks put faith in each other]
Karlsson had 45 points (three goals, 42 assists) in 53 games during his first season in San Jose and was tied for second on the Sharks with 16 points (two goals, 14 assists) in 19 Stanley Cup Playoff games. However, he was injured and did not play when they were eliminated by the St. Louis Blues in Game 6 of the Western Conference Final on May 21.
"This is a place I want to be and can reach my potential," Karlsson said. "I have nothing but good things to say about everyone, the trainers, the staff, everyone. This was a big decision for me. I know this is the right one for me, for my family and the organization. I'm happy with how everything happened and that they didn't force me into making a decision earlier than this. The process was handled well on both parts."