We study how social media affects election outcomes using variation in the number of Twitter users across U.S. counties induced by participants of the 2007 South by Southwest (SXSW) festival, a key event in Twitter’s rise to popularity. We show that this variation, which remains predictive of Twitter use a decade later, is unrelated to electoral outcomes before the platform’s mass adoption. Our results suggest that exposure to Twitter lowered the Republican vote share in the 2016 and 2020 presidential elections, but had limited effects on vote shares in House and Senate races, as well as previous presidential elections. Evidence from two sources of survey data indicates that the effects are driven by independent and moderate voters. Our results are consistent with Twitter’s relatively liberal content persuading voters to alter their views.