Miraculously, the three-year-old girl escaped without a cut - and spat out the blade into her shocked grandmother’s hand.
But Sheffield magistrates ordered DJ&C Foods Ltd, which runs the shop where the ice cream was bought, to pay more than £7,000 - after company bosses admitted placing unsafe food on the market.
Council prosecutor Paul Barber said the firm, which runs 20 shops in the Love Coffee franchise, including outlets at Meadhowhall and Crystal Peaks, had failed to manage their operation safely.
He told the court: “A child of three years old went with her grandma to buy an ice cream at Love Coffee on March 5 last year.
“The grandma bought and paid for the ice cream, and it was handed to the little girl.
“The girl took a mouthful of the ice cream and ended up with part of a craft knife blade in her mouth.
“It got there because of a failure by the management system to avoid that risk.”
Managing director Shashi Patel, and area manager Paul Nobes, were in court as magistrates ordered the company to pay a £6,000 fine, £1,058 costs and a £15 victim surcharge.
Their defence lawyer Adrian Farrow showed the court a craft knife the company used to open boxes of ice cream, a type recommended by the franchise company’s guidelines.
“This type of knife is one where the blade is snapped off and the next sharp blade becomes available,” he said.
“Mr Nobes used the knife to open boxes and realised the blade was blunt.
“He snapped off the end and discarded the blade into what he thought was the bin - but it went into one of the tubs of ice cream.”
Mr Farrow said Mr Nobes had been disciplined, and a new type of knife has since been introduced into each of Mr Patel’s 20 outlets.
He added: “Mr Patel regards this as a blight on his company’s history. He runs a family firm which is well regarded.”
The lawyer added that in Love Coffee’s last surprise health inspection the Meadowhall outlet received four stars out of a possible five.
Magistrate Sharon Green, chairing the bench, said the sentence took into account the company’s guilty plea - and warned it could have been as high as £20,000.
DJ&C Foods last year posted retained profits of £725,626.
Mr Patel, aged 48, and his wife Mina, 56, opened the Love Coffee outlets last year after the 200-strong BB’s Coffee and Muffins chain went into administration.
Mr Patel was previously BB Coffee and Muffins’ biggest franchisee, and reopened several of his former stores as rebranded Love Coffee outlets.