* Net revenue up 23%, beats estimates
* Swings to net profit of 618.8 million yuan
* Shares up 5% before the bell (Adds details from statement, background and shares)
Aug 13 (Reuters) - JD.com Inc on Tuesday reported better-than-expected second-quarter revenue, boosted by stronger sales in its online retail business, sending its shares 5% higher in pre-market trading.
The online retailer's upbeat results provided a bright spot in China's e-commerce industry and wider tech sector which is slowing down after years of growth.
Companies like JD.com and bigger rival Alibaba are seeking to diversify beyond online shopping to deal with the slowing growth.
JD.com has entered new businesses, such as convenience stores and supermarkets. It is also investing in AI to improve its logistics and advertising capabilities.
JD.com's shares rose to $28.49 in premarket trading on Nasdaq.
The company's net revenue rose 23% to 150.28 billion yuan ($21.28 billion) in the second quarter ended June 30. Analysts were expecting revenue of 147.49 billion yuan, according to IBES data from Refinitiv.
Net income reached 618.8 million yuan ($90.1 million), up from a net loss of 212.4 million the year prior.
Sales from its product business, which includes online retail sales, rose about 21% to 133.52 billion yuan.
For the third quarter, JD expects revenue between 126 billion yuan and 130 billion yuan, the mid-point of which was above analysts' estimates of 126.21 billion yuan.
($1 = 7.0625 Chinese yuan renminbi) (Reporting by Akanksha Rana in Bengaluru and Josh Horwitz in Shanghai; Editing by Shailesh Kuber and Jane Merriman)