This study reveals carbon nanotubes with pH-switchable gates, enhancing our understanding of ion transport and offering insights for synthetic membrane design.