The rent cap applies to rents for private and social tenants as well as for student accommodation.
It is set at zero per cent between 6 September until 31 March, although ministers have the power to vary the rent cap while it is in effect.
The measures can be extended over two further six-month periods.
Evictions are also banned, except in specific circumstances, and the damages required for unlawful eviction has been upped to 36 months’ of rent.
Tenants’ rights minister Patrick Harvie said: “I am pleased that Parliament has passed this Bill to support tenants through the current cost of living crisis.
“People who rent their home are more likely to live in poverty or be on low incomes than other people, and many will be anxious about keeping up payments on their homes as their everyday expenses rise.”
He added: “With this Bill now set to become law, tenants in the social or private rented sector, or in student accommodation, will have stability in their homes and housing costs.
“I’m hugely grateful to MSPs for scrutinising and agreeing this legislation this week, ensuring these protections can be brought in with the urgency that this crisis demands.”