Abstract With the increasing requirement of precise humidity control in agriculture, industry, and scientific experiments, the humidity sensors based on porous materials such as metal-organic framework (MOF) have aroused much attention because of their high porosity and tunable structure. However, the reported MOFs exhibit narrow detecting range and long response time due to the absence of ion carriers in porous framework. In this paper, an ionic covalent organic framework (COF) named TpPa-SO3Na was synthesized, and its humidity sensing performance was investigated for the first time. TpPa-SO3Na with -SO3Na groups possesses a water adsorption capacity of 411 cm3 g−1, which is confirmed by water adsorption-desorption measurement. The sensor based on TpPa-SO3Na exhibits good impedance-RH linearity, rapid response characteristic (∼6 s) and narrow hysteresis (∼3% RH) in the 11–95 % RH. Moreover, the ionic COF sensing material presents good repeatability. These results strongly suggest ionic COFs are a class of promising candidates for humidity sensing applications.