TOKYO—Japan's consumer prices kept rising in July, with the inflation rate steady, but consumers and businesses were slow to shake off the hangover from the sales-tax increase in April.

Policy makers and market participants are keenly watching how swiftly the economy gets back on its feet after contracting sharply in the April-June quarter following the rise in the sales tax to 8% from 5%. Gross domestic product contracted an annualized 6.8% in the three-month period.