The new deal will keep the 22-year-old at St James’ Park until 2021.
Perez joined the Magpies in a £1million deal from Tenerife in the summer of 2014.
“It’s a special day for me, a big day for me,” he said. “The truth is I’m really happy here, so it’s a good thing for me – and I hope it’s the same for the Geordie family.
“Newcastle gave me everything and I’m really pleased to sign this new contract. When I came to Newcastle people told me that the fans here were amazing. It was not true.
“They are much more than amazing. Thanks to all the people in the club and in the city. Newcastle United is my home and the Toon Army is my family. I just can say that I will give everything for this team and for the fans.”
Head coach Steve McClaren said: “I am delighted that Ayoze has signed a new deal. He is a very good player with huge potential and someone we believe has a very big future at Newcastle United.
“We are building this Club for the long-term and Ayoze is a very important part of that.”