The ban, which comes in the middle of the wedding season, has to be enforced by the centre.
The court had earlier indicated it may favour such a step to control the pollution in the region, which rose to dangerous levels in the days following Diwali.
The petition by the three children had said: "Our lungs have not yet fully developed and we cannot take further pollution through bursting of crackers."
No fresh licences to sell firecrackers will be given, the court said, and existing licences will be suspended.
The court order means no one can sell or stock fire crackers, says Gopal Sankaranarayanan, the lawyer for the petitioners and Co founder of Care for Air
"Some individuals who have leftover crackers from Diwali can burst them but no one can bring crackers from outside Delhi, because it needs a licence," he said.
The court has also asked the Central Pollution Control Board to submit a report within three months on the harmful effects of making crackers.