Matip’s current deal was due to expire at the end of this season.
The 28-year-old joined Jurgen Klopp’s men on a free transfer from German side Schalke 04 in the summer of 2016 and has become a key cog in the centre of the Liverpool defense alongside Virgil Van Dijk.
“It’s a great feeling to be a longer part of the club. It’s really just a great feeling," Matip told Liverpool’s official website after inking his new deal.
“From outside, you know Liverpool is such a big club – but when you are inside, then you really get a feeling for how big the club is. In all the countries, the supporters are everywhere. It’s a massive and big club that I think every player would want to play for.
“We have a young and talented team and I think every one of us is hungry. Now we’ve seen how it is to win something and we want to have that feeling again.
“There are a lot of things still to achieve. You never know how it will end, you just have to work hard and do the best you can do. Then we will see.
“It is an honour to be a part of the club. It makes me happy that people think I’ve done a good job and they want to keep me.”
The former Cameroon international has made 107 appearances in all competitions for Liverpool, scoring five goals and was part of the side that won the UEFA Champions League last season.
Matip has played six times in the Premier League this season but has missed Liverpool’s last two games due to a knock.
He will be available again for selection when Liverpool attempt to win a record-equaling 18th consecutive league game against Manchester United on Sunday.