"Specifically, the year-on-year growth was 6.9 percent for the first quarter, and 6.9 percent for the second quarter", the bureau said in a statement.
In 2016 China expanded by 6.7 per cent.
Many analysts expect the world's second-largest economy to lose steam later in the year as policy measures to rein in red-hot housing prices and a rapid build-up in debt take a greater toll on growth. The economy remains on track to meet the government's growth target of about 6.5% this year.
Debt-fuelled investment in infrastructure and real estate has underpinned China's growth for years but warnings of a potential financial crisis have spurred Beijing to clamp down.
Xing also noted, however, that China must be aware that there were "still many unstable and uncertain factors overseas and long-term structural contradictions remain prominent at home".
The forecast of a gradual growth slowdown due to a weakening property sector and the possible moderation of domestic demand, as well as uncertainties over external demand remained valid, state-run Xinhua news agency quoted the report as saying.
That follows Moody's decision in May to downgrade China for the first time in nearly three decades on concerns over its ballooning credit and slowing growth.
The growth rate, which compares expansion with the same three months in the previous year, was the same as in the first quarter of 2017.
The NBS said that industrial output grew 7.6% year-on-year in June, equaling the fastest rate of growth reported since December 2014.
Chinese authorities release a raft of economic data today, including GDP growth, industrial output and retail sales.
Factory output was 7.6% higher compared to a year earlier in June, while fixed-asset investments were up 8.6% in the first six months of the year.
Analysts said investors were cautious after Chinese President Xi Jinping stressed the need to control financial risks at a five-yearly financial conference over the weekend.