"Today is a very special day. I feel at home in this club," the 2010 World Cup winner for Spain told reporters. "I want to stay here until I finish my career as a footballer.
"When they gave me the chance to renew I didn't have any doubts. My head is solely in FC Porto, in finishing my career here and representing the values of the club and the values of the Porto fans.
"After that, frankly, I don't know, but I hope I'm always tied to football."
Porto president Jorge Nuno Pinto da Costa said Casillas, who has made over 870 club appearances in his career, was among the best goalkeepers the club had.
"Iker Casillas is among the extraordinary goalkeepers that FC Porto always had," Da Costa said. "And we're sure that we will always continue with excellent goalkeepers."
Porto are currently second in the league standings, tied with Benfica on 63 points, and are also in the Champions League quarter-finals where they will take on last year's runners-up Liverpool in April.
(Reporting by Rohith Nair in Bengaluru; Editing by Christian Radnedge)