A turn-on fluorescent sensor based on benzothiadiazole was constructed for simultaneous selective and visual detection of oxalyl chloride and phosgene.