Although many governments invest significant resources in public-diplomacy campaigns, there is little well-identified evidence of these efforts' effectiveness. We examine the effects of a major type of public diplomacy: high-level visits by national leaders to other countries. We combine a dataset of the international travels of 15 leaders from 9 countries over 11 years, with worldwide surveys administered in 38 host countries. By comparing 32,456 respondents interviewed just before or just after the first day of each visit, we show that visiting leaders can increase public approval among foreign citizens. The effects do not fade away immediately and are particularly large when public-diplomacy activities are reported by the news media. In most cases, military capability differentials between visiting and host countries do not appear to confer an advantage in the influence of public diplomacy. These findings suggest that public diplomacy has the potential to shape global affairs through soft power.