Townsend, 30, was a free agent after his contract with Crystal Palace expired at the end of last season.
The move to Merseyside will see Townsend linking up again with new Toffees manager Rafael Benitez, having played under the Spaniard at Newcastle.
“I think everyone knows what Everton is,” said Townsend in a club statement.
“It’s a massive football club, it’s very ambitious, a club which has been trying to get back to where it belongs into Europe and beyond. I’ll be doing all I can to help the club do that.”
Benitez’s appointment riled many Everton fans given he was once the manager of local rivals Liverpool.
Townsend, however, said: “Rafa is very experienced. He does a lot of work on the tactical side on the training pitch, he leaves no stone unturned.
“But more importantly, he’s a great man, a great man-manager, and he’s always talking to you. I’m sure he will be very successful here.
Townsend, capped 13 times by England, made his name at Tottenham.
He moved to Newcastle in 2016 but left for Palace after the Magpies’ relegation from the Premier League later that year.
Townsend tweeted: “After 5 amazing years and countless memories, it’s time to say my goodbyes to everyone at Crystal Palace.
“I’d like to say particular thank yous to the chairman for bringing me to Selhurst and giving me the opportunity to wear the red and blue, to Sam (Allardyce) and Roy (Hodgson) for their belief in me, and to my team-mates for the special moments we enjoyed together on the pitch.
“To the Palace fans. The beating heart of the club. To each and every one of you… Thank you. Thank you for all of your support, it’s that support which makes the club and Selhurst Park so special.”