To evaluate the relationship between relative fat mass (RFM) with prehypertension and hypertension in general population. This investigation was a cross-sectional study that recruited 4,885 community-dwelling residents from Zhejiang Province in September 2023 to November 2023. The logistic regression and penalized spline method were applicated to determine the correlation between RFM with prehypertension and hypertension. The interaction effects and subgroups analyses were further conducted to estimate the stability of the aforesaid findings. Besides, the category-free analysis was performed to demonstrate whether the addition of the RFM levels to the traditional model could improve the risk classification of prehypertension and hypertension. The prevalence of prehypertension and hypertension were, respectively, 64.8%. Multivariable logistic regression indicated that the risk of prehypertension (hazard ratio, 1.99; 95% confidence interval, 1.63-2.44) and hypertension (3.41; 2.81-4.14), respectively, increased by 99% and 241% per standard deviation increase in RFM after adjusting for established risk factors. Taking the participants in the lowest RFM quartile as the reference, and those with the highest quartile had a significantly increased risk of prehypertension (5.26; 3.03-9.12) and hypertension (20.42; 11.84-35.22). The restricted cubic splines demonstrated aforesaid associations were linear, and interaction and subgroup analysis observed the stability of these findings. The category-free analysis suggested that the addition of RFM to the traditional model eventuated an improvement in predictive ability of prehypertension and hypertension. Our results corroborated the positive association between RFM with prehypertension and hypertension. Clinically, the calculation of RFM should be emphasized in the risk assessment of hypertension and prehypertension.