The council adopted a resolution on Monday by a vote 14 to 1 that demands Iran "suspend all enrichment-related and reprocessing activities, including research and development".
Qatar, the only Arab member of the council, voted against the resolution that has been under negotiation for weeks.
If Tehran does not comply by August 31, the council would consider adopting "appropriate measures" under Article 41 of Chapter 7 of the UN Charter, which pertains to economic sanctions, the draft said. This excludes military action.
The resolution is the first on Iran with legally binding demands and a threat to consider sanctions.
On the eve of the vote, Mahmoud Ahmadinejad, the Iranian president, told a news conference that the resolution was unacceptable and his country had the right "to take advantage of peaceful nuclear technology".
Germany and the council's five permanent members with veto power - the US, Russia, China, France and Britain - negotiated the text.
But Russia and China are reluctant to impose sanctions and Valery Churkin, Russia's ambassador to the UN, has said the sanctions provision meant that the council would have "a discussion" only on punitive measures.
Churkin also said the deadline of August 31 was to meet Iran's request that it be given until August 22 to respond to an offer made in June by the six nations. The package offered earlier would benefit Tehran in the areas of energy, commerce and technology if it were to suspend its nuclear work.
The US and its allies suspect Iran is developing a nuclear bomb and accuse it of hiding research over 18 years. Iran says its nuclear programme is civilian.