Female sex workers are at high risk of sexually transmitted infections (STIs) and Human Immunodeficiency Virus (HIV), and adequate knowledge is essential for adopting preventive behaviors. This study aimed to analyze the association between knowledge of sexually transmitted infections and STI/HIV preventive behavior among female sex workers in Tegal Gede, Bekasi Regency. An analytical cross-sectional study was conducted in 2023 using total sampling of all 36 active female sex workers in the study area. Data were collected using structured questionnaires to assess STI knowledge and STI/HIV preventive behavior. Descriptive statistics, including frequencies, percentages, and a 2 × 2 crosstabulation, were calculated. Because 75% of the expected cell counts were below 5, the two-sided Fisher exact test was used, and the association was expressed as an odds ratio (OR) with a 95% confidence interval (CI). Poor STI knowledge was identified in 33 respondents (91.7%), and 32 respondents (88.9%) demonstrated unsupportive STI/HIV preventive behavior. Unsupportive behavior was observed in 31 of 33 respondents (93.9%) with poor STI knowledge compared with 1 of 3 respondents (33.3%) with good STI knowledge. Knowledge of STIs was significantly associated with STI/HIV preventive behavior (Fisher exact p = 0.027; OR = 31.00; 95% CI: 1.896–506.771). Poor STI knowledge was associated with substantially higher odds of unsupportive STI/HIV preventive behavior. These findings highlight the importance of targeted, non-stigmatizing health education and improved access to STI/HIV prevention services for female sex workers.