HIV testing and counselling is the first crucial step for linkage to HIV treatment and prevention. However, despite high HIV burden in sub-Saharan Africa, testing coverage is low, particularly among young adults and men. Community-based HIV testing and counselling (testing outside of health facilities) has the potential to reduce coverage gaps, but the relative impact of different modalities is not well assessed. We conducted a systematic review of HIV testing modalities, characterizing community (home, mobile, index, key populations, campaign, workplace and self-testing) and facility approaches by population reached, HIV positivity, CD4 count at diagnosis and linkage. Of 2,520 abstracts screened, 126 met eligibility criteria. Community HIV testing and counselling had high coverage and uptake and identified HIV-positive people at higher CD4 counts than facility testing. Mobile HIV testing reached the highest proportion of men of all modalities examined (50%, 95% confidence interval (CI) = 47-54%) and home with self-testing reached the highest proportion of young adults (66%, 95% CI = 65-67%). Few studies evaluated HIV testing for key populations (commercial sex workers and men who have sex with men), but these interventions yielded high HIV positivity (38%, 95% CI = 19-62%) combined with the highest proportion of first-time testers (78%, 95% CI = 63-88%), indicating service gaps. Community testing with facilitated linkage (for example, counsellor follow-up to support linkage) achieved high linkage to care (95%, 95% CI = 87-98%) and antiretroviral initiation (75%, 95% CI = 68-82%). Expanding home and mobile testing, self-testing and outreach to key populations with facilitated linkage can increase the proportion of men, young adults and high-risk individuals linked to HIV treatment and prevention, and decrease HIV burden.This article has not been written or reviewed by Nature editors. Nature accepts no responsibility for the accuracy of the information provided.