Hazel dormice Muscardinus avellanarius have severely declined since 2000 leading to increased legislative protection in the UK and Europe. Artificial nestboxes are widely used for its conservation and monitoring. Previous research has focused on how to identify suitable areas for nestboxes, but where to place individual boxes to promote occupancy is less well understood. Here, we demonstrate the use of machine learning Random Forest regression to predict nestbox occupancy from a wide range of microhabitat variables using a UK woodland as a case study. Random forest models are powerful predictive tools that allow simultaneous testing of many predictors with relatively few observations.Field data included observed nestbox occupancy (2017–2021) and measurements of 76 microhabitat variables collected in the summer of 2021 from 45 occupied and unused nestboxes located in a deciduous woodland in Berkshire, UK. We applied Random Forest regression to identify important variables and predict nestbox occupancy demonstrating robust approaches to tune model hyperparameters and evaluate importance metrics.In our study area, nestboxes were more likely to be occupied in sites with more hazel Corylus avellana, greater overall tree abundance but not fully closed canopies (optimal 80–85%), more honeysuckle Lolium periclymenum and hawthorn Crataegus monogyna, and when located further from footpaths and woodland margins. Occupancy over the study period was well predicted using microhabitat variables (13.3% OOB error) but future occupancy was more uncertain (33.3% error for 2021–2023 records).Modelling approaches that allow consideration of numerous variables from few locations or observations can be help identify relevant features and predict desirable outcomes of conservation actions. Here we demonstrate this approach identifying microhabitat variables that influence artificial nestbox occupancy by hazel dormice in a UK woodland. Findings offer some recommendations for local management that could promote nestbox occupancy and improve monitoring and conservation efforts.