(Adds economist's quote, details on inventories)
* June factory output +1.6 pct vs f'cast +1.7 pct
* Manufacturers expect output to rise in July and Aug
TOKYO, July 31 (Reuters) - Japan's factory output rebounded in June from a decline in May as production of cars and industrial chemicals increased, suggesting economic expansion may be on a more stable footing.
Industrial output rose 1.6 percent in June from the previous month, just below the median estimate for a 1.7 percent increase and following a 3.6 percent decline in May.
Manufacturers forecast a steady increase in output in coming months, offering further evidence that firm overseas demand and gains in consumer spending could support overall growth in Japan's economy.
"Overall, the trend looks healthy due to domestic demand and demand from emerging markets, said Norio Miyagawa, senior economist at Mizuho Securities.
"It's safe to say the economy continued its expansion in April-June and the forecasts point to further growth in output."
Transport sector output rose 4.2 percent in June, rebounding from a 13.0 percent tumble in the previous month, as output of passenger cars and automobile engines recovered.
Output of chemicals rose 3.4 percent in June, also a rebound from a 2.2 percent decline in May.
Inventories across all industries fell 2.2 percent in June, the biggest decline in more than six years, as inventories of cars, steel, and electronic equipment were reduced.
Some economists were concerned that inventories in the past few months were too high, and that companies would have to cut output.
However, the decline in inventories in June shows that companies still have room to expand output, said Mizuho Securities' Miyagawa.
Manufacturers surveyed by the ministry expect output to rise 0.8 percent in July and 3.6 percent in August, which also shows that gains in output are likely to be maintained.
Industrial output rose 1.9 percent in the April-June quarter, handily exceeding the 0.2 percent increase seen in January-March.
Given the close correlation between industrial output and gross domestic product this suggests the overall economy accelerated in April-June.
The positive output reading follows data last week showing the biggest increase in household spending in almost two years and an increasingly tight labor market, building optimism that the economy will maintain its upward momentum. (Reporting by Stanley White; Editing by Eric Meijer)