The reading translates to a quarterly rise of 0.8%, exceeding the 0.5% increase expected by economists in a Reuters poll.
Private consumption, which accounts for more than half of economic output, rose 1.0%, compared with expectations for a 0.5% increase and the first rise in five quarters.
Capital spending, a key driver of private demand-led growth, rose 0.9 percent in the second quarter, compared with the 0.9 percent increase expected by economists polled by Reuters.
External demand, i.e. exports minus imports, subtracted 0.1 points from growth, according to the data.
The Bank of Japan raised interest rates last month and outlined a plan to reduce its massive bond purchases, a further step toward phasing out its massive monetary stimulus.