Crocodilians are distributed widely through the tropics and subtropics, and several species pose a substantial threat to human life. This has important implications for human safety and crocodilian conservation. Understanding the drivers of crocodilian attacks on people could help minimize future attacks and inform conflict management. Crocodilian attacks follow a seasonal pattern in many regions, but there has been limited analysis of the relationship between attack occurrence and fine-scale contemporaneous environmental conditions. We use methods from environmental niche modelling to explore the relationships between attacks on people and abiotic predictors at a daily temporal resolution for the Nile crocodile Crocodylus niloticus in South Africa and Eswatini (formerly Swaziland), and the American alligator Alligator mississippiensis in Florida, USA. Our results indicate that ambient daily temperature is the most important abiotic temporal predictor of attack occurrence for both species, with attack likelihood increasing markedly when mean daily temperatures exceed 18 °C and peaking at 28 °C. It is likely that this relationship is explained partially by human propensity to spend time in and around water in warmer weather but also by the effect of temperature on crocodilian hunting behaviour and physiology, especially the ability to digest food. We discuss the potential of our findings to contribute to the management of crocodilians, with benefits for both human safety and conservation, and the application of environmental niche modelling for understanding human–wildlife conflicts involving both ectotherms and endotherms.