Objective To examine whether social media and online behaviours are associated with unhealthy food and beverage consumption in children. Design A cross-sectional online survey was used to assess Internet and social media use, including engagement with food and beverage brand content, and frequency of consumption of unhealthy foods and beverages. Linear regression models were used to examine associations between online behaviours, including engagement with food and beverage brand content, and consumption of unhealthy foods and beverages, adjusting for age, sex and socio-economic status. Setting New South Wales, Australia, in 2014. Subjects Children aged 10-16 years (n 417). Results Watching food brand video content on YouTube, purchasing food online and seeing favourite food brands advertised online were significantly associated with higher frequency of consumption of unhealthy foods and drinks after adjustment for age, sex and socio-economic status. Conclusions Children who have higher online engagement with food brands and content, particularly through online video, are more likely to consume unhealthy foods and drinks. Our findings highlight the need to include social media in regulations and policies designed to limit children's exposure to unhealthy food marketing. Social media companies have a greater role to play in protecting children from advertising.