The basicity of a series of sulfonamides and carboxamides with respect to protonation and hydrogen-bonded complex formation with phenol was investigated by calculations using the Becke three-parameter hybrid functional combined with Lee-Yang-Parr correlation functional with the 6-311G** and 6-311++G** basis sets and by infrared spectroscopy. The effect of fluorinated substituent was studied for the two series. The proton affinity of nitrogen in sulfonamides is higher than oxygen, in contrast to carboxamides, which are protonated at oxygen. The phenyl group in benzenesulfonamide increases the basicity of both heteroatoms, but more strongly of the nitrogen, whereas in benzamide the effect on the two heteroatoms is about the same. The CF 3 group equally decreases the basicity of nitrogen and oxygen atoms in sulfonamides and carboxamides. The second fluorinated substituent decreases the basicity of oxygen in (CF 3 CO) 2 NH more strongly than of nitrogen. For sulfonamides, the same effect results in the reverse of the center of basicity from nitrogen in (MeSO 2 ) 2 NH to oxygen in (CF 3 SO 2 ) 2 NH. All studied carboxamides give H-complexes via the carbonyl oxygen, whereas for sulfonamides two types of H-complexes, with the OHÁÁÁN and OHÁÁÁO=S, were found theoretically, the latter being more stable. The exception is bisimide (CF 3 SO 2 ) 2 NH, for which only the OHÁÁÁO=S complex is stable. Experimentally, only the oxygen-bound complexes are observed. Analysis of the natural charges revealed an 'abnormal' increase of the electron density on the NH group by electron-acceptor substituents in CF 3 SO 2 NHR, which was explained using the natural bond orbital analysis by loosening of the S-N bond because of orbital interactions with the s* SÀN orbital.