Several vaccines against COVID-19 have now been developed and are already being rolled out around the world. The decision whether or not to get vaccinated has so far been left to the individual citizens. However, there are good reasons, both in theory as well as in practice, to believe that the willingness to get vaccinated might not be sufficiently high to achieve herd immunity. A policy of mandatory vaccination could ensure high levels of vaccination coverage, but its legitimacy is doubtful. We investigate the willingness to get vaccinated and the reasons for an acceptance (or rejection) of a policy of mandatory vaccination against COVID-19 in June and July 2020 in Germany based on a representative real time survey, a random sub-sample (SOEP-CoV) of the German Socio-Economic Panel (SOEP). Our results show that about 70 percent of adults in Germany would voluntarily get vaccinated against the coronavirus if a vaccine without side effects was available. About half of residents of Germany are in favor, and half against, a policy of mandatory vaccination. The approval rate for mandatory vaccination is significantly higher among those who would get vaccinated voluntarily (around 60 percent) than among those who would not get vaccinated voluntarily (27 percent). The individual willingness to get vaccinated and acceptance of a policy of mandatory vaccination correlates systematically with socio-demographic and psychological characteristics of the respondents. We conclude that as far as people’s declared intentions are concerned, herd immunity could be reached without a policy of mandatory vaccination, but that such a policy might be found acceptable too, were it to become necessary.