The government will then investigate the findings of the pilots to see if they can be rolled out in other areas.
A free school meal project in Hull began five years ago but was ended by a Liberal Democrat council administration, said Mr Johnson in his keynote speech. The pilots will build on knowledge learnt from this previous project.
He added: 'Today, [schools secretary] Ed Balls and I have agreed to pilot free healthy school meals for all primary schools in at least two local authority areas.
'We'll examine the results so that we can gauge whether the clear early improvements in Hull are sustainable elsewhere.'
Mr Johnson went on to defend the government's record on the health service during his speech and claimed that a Conservative government could not be trusted to run the NHS.
He attacked the Conservative Party's 'patient passport' health policy included in its manifesto for the last general election and went on to criticise its current health policies.
'[The Conservatives] would abandon the maximum 18 week wait and the two week limit on cancer referral, scrap MRSA control targets, oppose greater patient access to their GP, stop the expansion of primary care and reorganise the NHS into a giant unelected quango,' Mr Johnson said.