Parliament has passed the Healthy Homes Guarantee Bill, meaning minimum standards of housing can be set for rental properties.
The Bill passed its third and final reading on Thursday by 63 votes to 57, meaning it will pass into law.
"Under our law, every rental property will have a modern heating source," said Housing Minister Phil Twyford. "It will be effectively illegal for landlords to rent out properties that are a threat to the health of the people living in them.
"It's not OK for a landlord to make hundreds of thousands of dollars by renting out a property that's a risk."
All rental properties will be required to meet minimum standards of ventilation, insulation, heating and moisture control. These standards will likely be set and enforced in the next 18 months.
Mr Twyford says the Bill is essential, because most renting tenants don't complain if their properties are cold or damp for fear of making their landlords angry - and potentially being kicked out of their homes.
National opposed the Bill, with Dr Nick Smith saying the power to regulate rentals already exists.
"The law already requires rental properties to be insulated," he said. "It already requires every rental property to be free of mould and damp."
Dr Smith, who was responsible for building regulations under the previous National government, said Parliament didn't know the details of the government's proposal, because the standards had not yet been set.
"This bill does diddly-squat," he said. "It's as shallow as a bird bath."