The New Zealand Business Number Bill has passed its third reading at parliament tonight.
The legislation will see all companies and public entities allocated a New Zealand Business Number by the end of the year.
Economic Development Minister Steven Joyce said a New Zealand Business Number was a unique identifier, that reduced the time and energy businesses spent providing the government with information.
"For businesses it will save time and cost through reduced form filling and data entry processes, and speed up dealings with government agencies."
All companies have had business numbers since 2013, but the new legislation meant the numbers would be extended to other businesses such as sole traders and incorporated societies.
The legislation passed 109 votes to 12.
New Zealand First's 12 MPs voted against the legislation.