With the aim to propose innovative antimicrobial agents able to not only selectively inhibit bacterial carbonic anhydrases (CAs) but also to be photoactivated by specific wavelengths, new heptamethine-based compounds decorated with a sulfonamide moiety were synthesized by means of different spacers. The compounds displayed potent CA inhibition and a slight preference for bacterial isoforms. Furthermore, minimal inhibitory and bactericidal concentrations and the cytotoxicity of the compounds were assessed, thus highlighting a promising effect under irradiation againstS. epidermidis. The hemolysis activity test showed that these derivatives were not cytotoxic to human red blood cells, further corroborating their favorable selectivity index. This approach led to the discovery of a valuable scaffold for further investigations.