Hansen was initially appointed for a two-year term in late 2011 after serving as assistant coach under Graham Henry when the All Blacks won the showcase tournament on home soil.
New Zealand Rugby Union (NZRU) chief executive Steve Tew said Hansen had proved a success in the top job and deserved a shot at steering the team to back-to-back world titles in England.
"He had an outstanding first year as head coach and his coaching and leadership helped the team build on its exceptional legacy," Tew said.
New Zealand won 12 of their 14 Test matches during Hansen's first season in charge, claiming the Rugby Championship, Bledisloe Cup and a three-Test series against Ireland, as well as retaining their number one world ranking.
Hansen said he was excited at the prospect of defending the World Cup and wanted to create a blend of experience and fresh talent that would keep the All Blacks ahead of their challengers.
"We have to keep growing both our leadership experience so that we have more players who can make good decisions in the big moments, and we need to grow our game so we stay in front rather than allowing others to catch up," he said.