A ratiometric fluorescent N,S co-doped carbon dots (N,S-CD) probe for ClO− has been facilely obtained via a one-step hydrothermal method.