Upvote:3
According to the Immigration Department of the Hong Kong SAR:
Indian nationals must apply for and successfully complete pre-arrival registration online before they can visit or transit the HKSAR visa-free (if seeking to enter the HKSAR during transit). Pre-arrival registration is not required for Indian nationals in direct transit by air and not leaving the airport transit area.
If you are not leaving the airside transit area of the Hong Kong Airport, you will not require a visa. If you wish to leave the airport to explore the city, you will have to apply for it in advance in their pre-arrival registration portal here.