In the search for new `sulfa drugs' with therapeutic properties, o-nitrosulfonamides and N-cycloamino-o-sulfanilamides were synthesized and characterized using techniques including 1H NMR, 13C NMR and FT–IR spectroscopy, and single-crystal X-ray diffraction (SC-XRD). The calculated density functional theory (DFT)-optimized geometry of the molecules showed similar conformations to those obtained by SC-XRD. Molecular docking of N-piperidinyl-o-sulfanilamide and N-indolinyl-o-sulfanilamide supports the notion that o-sulfanilamides are able to bind to human carbonic anhydrase II and IX inhibitors (hCA II and IX; PDB entries 4iwz and 5fl4). Hirshfeld surface analyses and DFT studies of three o-nitrosulfonamides {1-[(2-nitrophenyl)sulfonyl]pyrrolidine, C10H12N2O4S, 1, 1-[(2-nitrophenyl)sulfonyl]piperidine, C11H14N2O4S, 2, and 1-[(2-nitrophenyl)sulfonyl]-2,3-dihydro-1H-indole, C14H12N2O4S, 3} and three N-cycloamino-o-sulfanilamides [2-(pyrrolidine-1-sulfonyl)aniline, C10H14N2O2S, 4, 2-(piperidine-1-sulfonyl)aniline, C11H16N2O2S, 5, and 2-(2,3-dihydro-1H-indole-1-sulfonyl)aniline, C14H14N2O2S, 6] suggested that forces such as hydrogen bonding and π–π interactions hold molecules together and further showed that charge transfer could promote bioactivity and the ability to form biological interactions at the piperidinyl and phenyl moieties.