Background: Type 2 diabetes mellitus (T2DM) mostly occurs in adults when the body becomes resistant to insulin. Genetic predisposition, age, an unhealthy diet, and a sedentary lifestyle are key factors leading to T2DM. Office workers are one of the populations at greatest risk of developing T2DM. This study assessed the level of knowledge and risk factors for T2DM among office workers in Mwanza City, Tanzania. Methods: A cross-sectional study was conducted among 309 office workers in public and private institutions in Mwanza City. A structured, pre-tested questionnaire was used to collect information from the participants. The coded data were analyzed using STATA Version 14. The associations between various risk factors for T2DM and knowledge on T2DM were determined using Chi-square or Fisher’s exact tests. Results: The level of knowledge was poor in 41.1%, moderate in 31.1%, and good in 27.8% of the study participants. Family history of T2DM showed a significant association with knowledge score (P=.001). Only 63 (20.4%) of respondents reported eating a healthy diet. Among the study participants, 154 (49.8%) had poor diabetes prevention practices, 82 (26.5%) had moderate practices, and 73 (23.7%) had good practices. Conclusion: The majority of the office workers who participated in this study had limited knowledge regarding risk factors for T2DM and poor practices concerning the prevention of the disease. In order to reduce the burden of T2DM, there is a need for lifestyle modification, provision of education, and raising awareness about the risk factors of T2DM among office workers in Mwanza City.