George Osborne has responded to the growing clamour for tough action on obesity by announcing plans for a sugary soft drinks tax intended to make children healthier and cut the disease’s £5bn a year cost to the NHS.

The levy, which will start in April 2018, will put up the price of drinks such as Red Bull, Capri Sun, Sprite and several versions of cola. The Treasury has not decided exactly how much extra they will force producers to charge for heavily sweetened drinks, but health campaigners want it to be 20%.

Companies that produce or import soft drinks with significant added sugar will have to pay one level of the tax for drinks containing at least 5g of sugar per 100ml and a higher rate for those with more than 8g per 100ml.

“Five-year-old children are consuming their body weight in sugar every year. Experts predict that within a generation over half of all boys and 70% of girls could be overweight or obese. Obesity drives disease,” the chancellor told MPs on Wednesday.

“One of the biggest contributors to childhood obesity is sugary drinks. A can of cola typically has nine teaspoons of sugar in it. Some popular drinks have as many as 13. That can be more than double a child’s recommended [daily] added sugar intake.”

George Osborne announced the levy in his budget speech in parliament. Photograph: Andy Rain/EPA

Doctors, the NHS England boss, celebrity chef Jamie Oliver and health charities welcomed the budget surprise, a controversial move No 10 had been considering privately for months.

Campaigners said they hoped the tax was a sign that the government’s childhood obesity strategy, the publication of which was recently delayed, would contain other similarly strong measures.

Oliver captured the mood of euphoria among health groups over the announcement when he tweeted:

We did it guys !!we did it !!! A sugar levy on sugary sweetened drinks ...... A profound move… https://t.co/0XkydLzLCo — Jamie Oliver (@jamieoliver) March 16, 2016

Britain will join a growing list of countries including France, Finland, Mexico and Hungary that have started taxing sugary drinks to reduce consumption, especially by children. Sales in Mexico have fallen 12% since it imposed a 10% surcharge on soft drinks in 2014.

But the food and soft drinks industry criticised Osborne for “a piece of political theatre” and warned that the tax would cost jobs and not help to cut obesity.

Gavin Partington, director general of the British Soft Drinks Association, said it was absurd to impose a tax hike on an industry that he claimed had cut the amount of sugar in its products by 13.6% since 2012.

Health organisations, however, hailed it as a bold step. The £520m a year it is expected to raise will be used to boost school sport, fund breakfast clubs at 1,600 schools in England and allow many secondary schools to extend their day.

Simon Stevens, chief executive of NHS England, said the sugar tax “will send a powerful signal and incentivise soft drinks companies to act on the health consequences of their products”.

He added: “While no child needs a daily dose of sugary fizzy water, sadly soft drinks are now our children’s largest single source of diabetes-inducing, teeth-rotting excess sugar.”

The tax would also help tackle health inequalities because poorer children are twice as likely to be obese as those from better-off backgrounds, he said.

Some of the soft drinks that will be taxed differently. Photograph: Jeff J Mitchell/Getty Images

Treasury sources said that the higher-level tax will apply to drinks containing at least 8g of sugar per 100ml, such as normal Coca-Cola, Red Bull, Coca-Cola Cherry and Irn-Bru. The lower level will affect brands containing less added sugar, such as Fanta, Sprite and Schweppes tonic.

Manufacturers will have to decide whether to absorb the cost, pass it on to consumers or reduce the amount of added sugar in their products. The Office for Budget Responsibility expects firms to start stripping out excess sugar.

Graham MacGregor, chief executive of Action on Sugar, welcomed the tax as “excellent, outstanding” but added “that in itself won’t get rid of obesity”. MacGregor, a professor of cardiovascular health at Queen Mary University of London, voiced frustration that it would not be introduced for two years. And he said the revenue raised would be better spent funding the creation of a new powerful nutritional watchdog, modelled on the old Food Standards Agency, than on increasing sport in schools.

“It will help and it’s good. But the most effective way to tackle obesity is to reformulate products so that we get down [levels of] sugar, the way we’ve done with salt reduction. The government will have to do a lot more, but I hope we will see that in the childhood obesity strategy,” he said.

An array of health groups, the Commons health select committee and Public Health England, the government advisers, have all recommended a sugar tax. It was one of a raft of measures PHE said in a report last year would help people consume less sugar.

Duncan Selbie, PHE’s chief executive, said: “A sugary drinks levy is fabulous news for children and families in helping them to cut back on sugar. This will reduce the risks of obesity, tooth decay and other life-threatening diseases. [It] is a stunning early indication of the government’s commitment to reducing child obesity.”

But denouncing the tax as unfair, Ian Wright, director general of the Food and Drink Federation, warned that the levy would deter firms from developing new, healthier products. “The imposition of this tax will, sadly, result in less innovation and product reformulation, and for some manufacturers is certain to cost jobs. Nor will it make a difference to obesity.”

Jeremy Hunt, the health secretary, said: “We know there is no silver bullet to solve our childhood obesity problem, but this is a fantastic start and our obesity strategy will build on this solid foundation.”