Also brightening the outlook, confidence among the nation's manufacturers hit a more than two-year high in May on the back of solid overseas orders, a Reuters survey showed on Thursday.

While the stronger exports and imports are partly helped by the favourable statistical base effects from the major plunge in trade seen a year earlier, real demand is also on the mend.

Global appetite for cars and electronics has picked up since last year, driven by a recovery in the U.S. and Chinese economies -- Japan's key markets -- although global chip shortages put a drag on overseas shipments in recent months.

Exports rose 38.0% in April from a year earlier, official data showed on Thursday, compared with a 30.9% increase expected by economists and following a 16.1% rise in March. That was the fastest gain since April 2010, led by U.S.-bound shipments of cars and car parts and Chinese demand for chip-making equipment.

"The trade data confirmed that exports were recovering steadily. Particularly car exports, which fell a lot last year, are picking up," said Yuichi Kodama, chief economist at Meiji Yasuda Research Institute.

"In Japan, capital spending tends to move in sync with external demand, so an export recovery is encouraging for machinery orders and capital expenditure."

By destination, exports to China, Japan's largest trading partner, rose 33.9% year-on-year in April, led by shipments of chip-making equipment, hybrid cars and scrap copper.

U.S.-bound exports grew 45.1% in the year to April, the fastest gain since 2010, on the back of demand for automobiles, car parts and ship engines.

Separate data from the Cabinet Office showed Japan's core machinery orders, a highly volatile data series regarded as an indicator of capital spending in the coming six to nine months, rose 3.7% in March from the previous month.

The rise in core orders, which exclude those of ships and electric utilities, compared with a 6.4% increase seen in a Reuters poll of economists, the data showed.

The Cabinet Office maintained its assessment on machinery orders, saying that a pick-up is stalling.

Japan's economy fell back into decline in the first quarter and economists have sharply revised down estimates for growth this quarter as emergency curbs hobble consumer spending that makes up more than half the economy.

"Export growth is welcome for the Japanese economy, but that doesn't mean the whole of Japan can benefit from it," said Ayako Sera, market strategist at Sumitomo Mitsui Trust Bank.

"What's important now is a recovery in service-sector activity helped by a progress on coronavirus vaccination."

(Reporting by Tetsushi Kajimoto and Daniel Leussink; Editing by Sam Holmes)

By Tetsushi Kajimoto and Daniel Leussink