The Bank of Japan had forecast that a solid economic recovery will help inflation sustainably hit its 2.0 per cent target, and justify raising interest rates further after it hiked them last month in its continued quest to exit years of massive monetary stimulus.
The increase in gross domestic product (GDP) compared with a median market forecast for a 2.1 per cent gain, and followed an upwardly revised 2.3 per cent contraction in the first quarter, government data showed on Thursday.
The reading translates into a quarterly rise of 0.8 per cent, beating a 0.5 per cent increase expected by economists in the Reuters' poll.
Private consumption, which accounts for more than half of the economic output, rose 1.0 per cent, compared with forecast for a 0.5 per cent increase and the first gain in five quarters.
Private consumption has been a soft spot in the economy, which has stuttered over the past year as households struggle with rising living costs, blamed in part on higher import prices due to the weak yen.
Public discontent over rising living costs was one of the factors that prompted Japan's Prime Minister Fumio Kishida to announce he would resign in September.
An influx of tourism has also helped boost retail sales in Japan. Fast Retailing, owner of clothing brand Uniqlo, highlighted strength of the domestic market in its most recent earnings, lifted by a surge in duty-free sales.
Spending by tourists is expected to reach eight trillion yen ($A82.94 billion) this year, according to the government, which sees tourism as an important growth driver in an economy long hobbled by an ageing population.
Capital spending, a key driver of private demand-led growth, rose 0.9 per cent in the second quarter, matching a median market forecast in a Reuters poll.
External demand, or exports minus imports, knocked 0.1 point off growth, the data showed.
The BOJ raised interest rates in July and detailed a plan to taper its huge bond buying in another step toward phasing out its massive monetary stimulus.
Japan is a global outlier in raising rates as most major central banks, including the US Federal Reserve, have begun to ease policy or are moving in that direction.