Williams, who is chasing an Olympics gold medal with the New Zealand sevens team this season, made the announcement at a NZR press conference in Auckland.
All Blacks coach Steve Hansen said it was great news that Williams had committed to New Zealand through to the next Rugby World Cup.