Based on data from the Semarang City Health Office, the highest rat population in Tembalang District in 2019 was in Tandang Village, with 164 rats caught. In addition, in 2018 there were 4 cases of Leptospirosis in Tandang Village and Leptospirosis was the highest infectious disease in Tandang Village, Tembalang District, Semarang City. This study aims to determine the relationship between the behavioral factors of leptospirosis disease prevention on rat density in Tandang Village, Semarang City. This study is a cross sectional study with a total sample of 64 respondents (RW 03 Tandang Village, Semarang City). The results of the analysis showed that the relative density of rats (trap success) in Tandang village was 28.1% and it was categorized as dense (> 7%) and showed that there was no relationship between knowledge of rat density (α = 0.05. P = 0.068), community attitudes. In the prevention of leptospirosis on rat density (α = 0.05. p = 0.07), there was a relationship between leptospirosis prevention behavior and rat density (α = p = 0.00). Conclusion: There is no relationship between knowledge and attitude in the prevention of leptospirosis on rat density. There is a relationship between leptospirosis prevention practices and rat density in Tandang Village, Semarang City.