In response to the rapid increase in textile waste and the consequent environmental pollution and depletion of petroleum resources, using waste polyethylene terephthalate (PET) and ammonium dihydrogen phosphate as raw materials, phosphorus nitrogen doped PET based carbon dots were prepared by pyrolysis method. The optimal preparation process of PET based carbon dots and their morphology, chemical structure and fluorescent properties were studied, and their applications in fluorescent anti-counterfeiting were explored. The results showed that at the optimal conditions of the mass of PET oligomer of 5 g, the ammonium dihydrogen phosphate mass of 2 g, the reaction temperature of 260 ℃, and the reaction time of 18 h, the PET based carbon dots have a typical excitation wavelength dependence. The optimal excitation and emission wavelength is 320 nm and 390 nm respectively, and the fluorescence quantum yield can reach 18.26%. The average fluorescence lifetime is 6.96 ns. PET based carbon dots is stable in water solubility and excellent in anti-interference. The fluorescent inks, phosphors and fluorescent agar made from them all exhibit bright blue fluorescence under 365 nm ultraviolet light irradiation. The PET based carbon dots have huge application potential in data encryption, anti-counterfeiting, imaging, LED devices, and more, providing new possibilities for the high-value recycling of waste PET.