Sunlight has both harms and benefits for human health. Exposing the skin to the sun is the main modifiable cause of skin cancers, which exert a considerable burden in Australia. The most well-established benefit of sun exposure is vitamin D production. Despite Australia’s high ambient ultraviolet radiation, approximately a quarter of the population is estimated to be vitamin D deficient. Balancing the harms and benefits is challenging and requires effective communication; previous surveys suggest a lack of knowledge in this area. We sought to provide a snapshot of public knowledge and attitudes regarding sun exposure and vitamin D, and to examine the associations between these factors and sun protective behaviors. In January 2020 (summer), 4824 Australians recruited via social media and email invitation completed an online survey. We found that only 25% and 34% of participants were able to identify the amount of time outdoors needed to generate vitamin D in summer and winter, respectively, with most people over-estimating in summer. One in four people thought that applying sunscreen prevents cutaneous vitamin D production. Just over half the respondents (54%) regularly applied sunscreen when outdoors for ≥30 minutes in summer, and 14% reported changing their sun exposure behavior to get enough vitamin D. Knowledge and attitudes towards vitamin D influenced sun protection behavior. Educating the general public about the ways in which to balance the harms and benefits of sun exposure might reduce over-exposure to the sun, while supporting natural vitamin D production.