There is widespread concern that social media is driving political polarization. Yet little is known about how the design of social media platforms influences social cohesion. We created a mobile chat platform to study the impact of anonymous conversations between opposing partisan identifiers. Our study recruited Republicans and Democrats in the United States to complete a survey about their political views. We later randomized them into treatment conditions where they were offered financial incentives to use our platform to discuss politics with opposing partisan identifiers with varying amounts of information about their discussion partners. We find that people who engage in anonymous cross-party conversations about controversial topics exhibit substantial decreases in polarization compared to a placebo group that was asked to write an essay using the same conversation prompts. These depolarizing effects were particularly strong among Republicans and are correlated with the civility of dialogue. Our findings demonstrate the potential for well-designed social media platforms to mitigate political polarization and underscore the need for an open-source open-source platform for scientific research on social media. * Shared first authorship.