BackgroundUnderstanding how HIV self-testing (HIVST) can meet the testing needs of gay, bisexual and other men who have sex with men (GBMSM) and trans people whose social networks vary is key to upscaling HIVST implementation. We aim to develop a contextual understanding of social networks and HIV testing needs among GBMSM (cis and transgender) and trans women in SELPHI (An HIV Self-testing Public Health Intervention), the UK’s largest randomised trial on HIVST.MethodsThis study re-analysed qualitative interviews conducted from 2015 to 2020. Forty-three in-person interviews were thematically analysed using the Framework Method. Our analytic matrix inductively categorised participants based on the unmet needs for HIV testing and the extent of social network support. The role of social networks on HIVST behaviour was explored based on individuals’ testing trajectories.ResultsFour distinct groups were identified based on their unmet testing needs and perceived support from social networks. Optimisation advocates (people with high unmet needs and with high network support, n = 17) strived to tackle their remaining barriers to HIV testing through timely support and empowerment from social networks. Privacy seekers (people with high unmet needs and with low network support, n = 6) prioritised privacy because of perceived stigma. Opportunistic adopters (people with low unmet needs and with high network support, n = 16) appreciated social network support and acknowledged socially privileged lives. Resilient testers (people with low unmet needs and with low network support, n = 4) might hold potentially disproportionate confidence in managing HIV risks without sustainable coping strategies for potential seroconversion. Supportive social networks can facilitate users’ uptake of HIVST by: (1) increasing awareness and positive attitudes towards HIVST, (2) facilitating users’ initiation into HIVST with timely support and (3) affording participants an inclusive space to share and discuss testing strategies.ConclusionsOur proposed categorisation may facilitate the development of differentiated person-centred HIVST programmes. HIVST implementers should carefully consider individuals’ unmet testing needs and perceived levels of social support, and design context-specific HIVST strategies that link people lacking supportive social networks to comprehensive HIV care.