The 25-year-old had been expected to succeed McCullum having already led the side in one-day internationals when the former captain was rested or injured, and at the recent World Twenty20 tournament in India.
He will become New Zealand’s 29th test captain when head coach Mike Hesson’s side tour Zimbabwe and South Africa in July-August.
“Kane has been a leader within the team for a long time now and already shown himself to be an extremely capable captain,” NZC Chief Executive David White said in a statement.
“He’s respected by his peers and the wider cricket community for his professional approach both on and off the field, and has a superb cricket brain.
“His drive to see the team succeed and his passion for the game are what you look for in a leader. He’s ready for the role and will only continue to grow,” added White.
McCullum retired in February following the test series against Australia after four years in charge, during which time the team made their first World Cup final and became more competitive in the longest form of the game.
“It’s certainly an honour,” said Williamson. “I’ve really enjoyed my time spent as captain and believe this team can achieve a lot.
“I’m lucky to have a number of experienced players around me for support and will certainly look to utilise this.”
Williamson, who made his international debut in 2010, had filled in for McCullum as recently as limited overs series against Sri Lanka and Pakistan earlier this year before the former wicketkeeper resumed the job during Australia’s tour of New Zealand in February.
“I’ve certainly learnt a lot from Brendon, as has everyone who has played with him,” added Williamson, who was named in February as the 2015 New Zealand Sportsman of the Year.
“The culture that he and Mike have cultivated has been a huge part of this team’s success in recent times. We not only have good players, but good people too and that certainly makes any captain’s job easier.”