Background: Currently, diabetes mellitus is starting to be suffered by many people at a young age. close to 22.3% of people with diabetes mellitus in Indonesia aged 15-24 years. Diabetes mellitus risk food behavior is one of the risk factors that must be avoided. However, there are still many young people, including univeristy students who still apply this behavior. The level of knowledge and social media is considered to have an influence on the eating behavior of students. So it is necessary to know the relationship between knowledge level and the influence of social media with the behavior of consuming food at risk of diabetes mellitus, so that diabetes mellitus prevention efforts are carried out effectively.Methods: This research is a analytical study with a cross-sectional study design. The sample in this study were 435 students at Diponegoro University. The sampling technique used in this study was accidental sampling. This study used an online questionnaire to determine the variables studied.Result: The results of this study indicate 53.3% of respondents have a high level of knowledge, 64.4% of respondents have a high influence of social media, and 56.1% have a risky food consumption behavior of diabetes mellitus. This study indicate a correlation between the level of knowledge (p=0.000) and the influence of social media (p=0.045) to the behavior of consuming food at risk of diabetes mellitus in Diponegoro University students.Conclusion: Based on the result, there is a relationship between the level of knowledge and the influence of social media with the behavior of consuming food at risk of diabetes mellitus in Diponegoro University students.