Ammonia-oxidizing archaea and ammonia-oxidizing bacteria (AOA and AOB), complete ammonia oxidizers (Comammox), and nitrite-oxidizing bacteria (NOB) play a crucial role in the nitrification process during the nitrogen cycle. However, their occurrence and diversity in mangrove ecosystems are still not fully understood. Here, a total of 11 pairs of PCR primers were evaluated to study the distribution and abundances of these nitrifiers in rhizosphere and non-rhizosphere sediments of a mangrove ecosystem. The amplification efficiency of these 11 pairs of primers was first evaluated and their performances were found to vary considerably. The CamoA-19F/CamoA-616R primer pair was suitable for the amplification of AOA in mangrove sediments, especially on the surface of rhizosphere sediments. Primer pair amoA1F/amoA2R was better for the characterization of novel AOB in the bacterial community of non-rhizosphere sediments of mangroves. In contrast, primer nxrB169F/nxrB638R showed a low abundance of NOB in mangrove sediments (except for R1). Comammox bacteria were abundant and diverse in mangrove sediments, as indicated by both the amoB gene for Comammox clade A and the amoA gene for Comammox Nitrospira clade B. However, the amoA gene for Comammox Nitrospira clade A was not successful in detecting them in the mangrove sediments. Furthermore, 568 operational taxonomic units (OTUs) were obtained by generating a clone library and a high abundance of OTUs was correlated with ammonium, pH, NO2−, and NO3−. Comammox and Comammox Nitrospira were identified by phylogenetic tree analysis, indicating that mangrove sediments harbor newly discovered nitrifiers. Additionally, many AOA and NOB were mainly distributed in the surface layer of the rhizosphere, whereas AOB and Comammox Nitrospira were in the subsurface of non-rhizosphere, as determined by qPCR analysis. Collectively, our findings highlight the limitations of some primers for the identification of specific nitrifying bacteria. Therefore, primers must be carefully selected to gain accurate insights into the ecological distribution of nitrifiers in mangroves. Key points: • Several sets of PCR primers perform well for the detection of nitrifiers in mangroves. • Mangroves are an important source of newly discovered nitrifiers. • Ammonium, pH, NO2−, and NO3− are important shapers of nitrifier communities in mangroves.