The ONS said the growth was driven by services, particularly retail, which more than offset falls in output in the manufacturing and construction sectors.
It had been a "notable slowdown" in growth from last year, ONS added.
"While services such as retail, and film production and distribution showed some improvement in the second quarter, a weaker performance from construction and manufacturing pulled down overall growth," said Darren Morgan, ONS head of national accounts.
"The economy has experienced a notable slowdown in the first half of this year," he added.
Film production in the UK, plus box-office receipts from cinemas, was one of the best performing parts of the economy during the period.
Tudor International Freight director, Adam Johnson was apprehensive upon the growth of the first six months of 2017. Despite increased growth in both quarters of the year, he insisted there are still improvements to be made.
“It’s good news and also bad. Despite growth continuing to increase, the expected figures were well below-par. It seems obvious that Brexit has had a big effect on matters as we are currently in unknown territory with a sense of fear.
“The UK growth was expected to be growing at around 2.5% or above for the year with more businesses gaining more investment across Britain. Despite projections not being great, at Tudor we have continued to add more staff to our company.
“The only worry is the impact Brexit will have. We are unsure of what it will do for our business in terms of shipping excess baggage across Europe. When we spoke to journalist Toby Young, he informed us that it may actually benefit us in the long run as we ship a range of chemicals, oil and gas across all continents around the world via our sea, road and air freight services.
Johnson concluded: “The jury is out and the results that have been released from the government are far from convincing but at Tudor, as always, we remain in good faith and optimistic of what the future holds."
Picture from: BBC
Philip Hammond, UK Chancellor, said the British economy had now grown consistently for four-and-a-half years.
"We can be proud of that, but we are not complacent," he said.
"We need to focus on restoring productivity growth to deliver higher wages and living standards for people across the country."
However, Labour shadow chancellor John McDonnell was left disappointed from results: "Growth for the first half of 2017 is below expectations, and it follows continued data showing working families are being squeezed with wages not keeping up with prices."