The 26-year-old goalie, who was acquired in a trade with the Washington Capitals on July 8, was a restricted free agent and avoided a salary arbitration hearing.
"It feels really good," Vanecek said. "They have a future, they have a lot of young guys. There is an opportunity for me to play lots of games. I'm really happy about that.
"New Jersey is a young team and they have a future. It's really nice. I hope we get far and get to the Stanley Cup with New Jersey."
Vanecek was 20-12-6 with a 2.67 goals-against average, .908 save percentage and four shutouts in 42 games (39 starts) for the Capitals last season, and 1-1 with a 4.21 GAA and .863 save percentage in two Stanley Cup Playoff games.
The Devils (27-46-9) finished seventh in the Metropolitan Division last season, missing the playoffs for the fourth straight season and ninth time in the past 10. They used seven goalies, the most in their history, and allowed the fourth-most goals per game in the NHL (3.68).
"That was our goal from the get-go was to add to the position because of the circumstance with injuries and really depleting our depth, to be frank," Devils general manager Tom Fitzgerald said July 8. "We don't want to go through that again. I wouldn't wish that on my worst enemy. However, it's been a goal from the get-go and there are options and options get limited, so then you're trying to find really what's best and you got to put your best foot forward and make a deal for a guy, and we're fortunate to land Vitek this morning."
Vanecek likely will battle for ice time with Mackenzie Blackwood, in the same way he competed with Ilya Samsonov in Washington.
"[Blackwood] is the same age like me," Vanecek said. "It's the same thing as in Washington, it will be a battle every single day. It's a little pressure on us because we have to play a good game every game. It's good, whoever will take the No. 1 will take the No. 1 and that guy will play the games."
Selected by Washington in the second round (No. 39) of the 2014 NHL Draft, Vanecek is 41-22-10 with a 2.68 GAA, .908 save percentage and six shutouts in 79 regular-season games (75 starts).
NHL.com staff writer Remy Mastey contributed to this report