TOKYO, July 11 (Reuters) - Japan's Nikkei share average ended slightly higher on Tuesday, snapping five straight sessions of losses, but the index surrendered most of its early gains as investors sold stocks to lock in profits.

The Nikkei index inched up 0.04% to close at 32,203.57, while the broader Topix reversed course to end 0.31% lower at 2,236.40.

"Investors sold stocks after the Nikkei gained, while the yen's strength was a negative factor," said Seiichi Suzuki, chief equity market analyst at Tokai Tokyo Research Institute.

The Nikkei rose after the end of the sell-off in exchange-traded funds (ETFs), in a move to distribute payouts, which market players estimated were worth more than 1 trillion yen ($7.10 billion).

"Some investors bought those stocks and sold them as soon as the Nikkei rose," said Tokai Tokyo's Suzuki.

The yen's strength against the dollar also prompted investors to sell stocks, added Suzuki.

The yen rose past 141 per dollar for the first time in nearly a month on Tuesday after U.S. Federal Reserve officials signalled that the central bank was nearing the end of its tightening cycle.

Among individual stocks, chip-testing making equipment maker Advantest jumped 4.26% and chip-making equipment maker Tokyo Electron rose 1.08%.

Shares of Sumco jumped 4.75% after a report said Japan would give the major producer of silicon wafers a subsidy of up to 75 billion yen ($530 million) to fund additional capacity.

Socionext tanked 7.23% ahead of the pricing of its shares as its top shareholders, including Panasonic Holdings and Development Bank of Japan, sold their entire stake in the chip-design company. The price of shares will be set any day between Tuesday and Thursday.

Drug maker Eisai lost 4.29%, weighing on the Nikkei the most. Peer Daiichi Sankyo slipped 3.3%.

($1 = 140.7500 yen) (Reporting by Junko Fujita; Editing by Rashmi Aich and Sohini Goswami)