Pedestrians walk along a street during in Tokyo on August 2, 2018.

Japanese workers' inflation-adjusted real wages rose in June at the fastest pace in more than 21 years, fueled by an increase in summer bonuses, government data showed, in an encouraging sign that consumer spending and inflation will pick up.

The 2.8 percent rise in real wages in June from a year earlier was the biggest gain since a 6.2 percent annual increase in January 1997, and followed a 1.3 percent annual increase in May, labor ministry data showed on Tuesday.

The data should be encouraging to the Bank of Japan as it struggles to accelerate inflation to its 2 percent target despite more than five years of massive monetary stimulus.

Nominal cash earnings rose 3.6 percent year-on-year in June, faster than a 2.1 percent annual increase in May.

Regular pay, which accounts for the bulk of monthly wages, grew 1.5 percent in May from a year earlier. Special one-off payments, which include summer bonuses, jumped an annual 7.0 percent.

Overtime pay, a barometer of strength in corporate activity, rose an annual 3.5 percent in June versus a revised 2.0 percent increase in May.

Major Japanese firms typically pay bonuses twice a year, once during the summer and once near year's end.