Pistacia vera L. is the only cultivated and commercially-grown species in the genus and Iran is one of the two major centers of Pistacia diversity and the main producer of pistachios in the world. Genetic diversity is crucial for sustainable use of genetic resources and conservation. To investigate the genetic diversity of pistachio (Pistacia vera), we genotyped 42 cultivars of this species using 20 polymorphic nuclear simple sequence repeat (nSSR) markers. The nSSR markers generated 3–7 alleles (102 in total) with an average of 5.10 per locus. Polymorphism information content (PIC) ranged from 0.36 to 0.86 with an average value of 0.64, while the observed heterozygosity (Ho) ranged from 0.21 to 0.79 with an average value of 0.44 and also the expected heterozygosity (He) varied from 0.11 to 0.39 with an average of 0.22. Genetic similarity values obtained from Dice’s coefficient ranged from 0.08 to 0.93. The UPGMA (unweighted pair group method with arithmetic mean) dendrogram and Bayesian clustering separated the cultivars into two major clusters containing 21 and 21 cultivars, respectively, and also the neighbour-joining method revealed their phylogenetic relationships. The present results indicated the existence of wide genetic variability within the species and can be used for further research in the area of germplasm conservation and plant breeding.