Nematodes are a large and diversified zoological group with a wide global distribution, being able even to be present in habitats with extreme conditions. Although coastal dunes can be considered as an adverse environment for these animals, numerous species are discovered there. In general, these small animals present some morphological characteristics, which provide them a high adaptability to these habitats and the ability to reach a wide distribution. In this study, a total of 222 sample sites of coastal sand dunes have been studied in order to know the nematofauna of these habitats. Thus, 42 coastal dunes from three geographical areas of the Iberian Peninsula coast (Atlantic coast, southern Mediterranean coast, and northern Mediterranean coast) were examined. A total of 120 species of nematodes were found, belonging to eight orders. The results showed the higher prevalence of the species belonging to the order Rhabditida, which were present in 84.2% of the sand dunes studied, most of them belonging to the family Cephalobidae with 42 species, while the order with lower prevalence was the order Enoplida appearing only in one dune (0.9%). The classification of nematofauna by trophic groups showed that bacterial feeders, omnivores, hyphal feeders, and plant feeders shared a high prevalence (83.3%, 40.5%, 34.2%, and 32.8%, respectively), while predators, unicellular eukaryote feeders, and substrate ingesters account for less than 11%. A list of the found species, prevalence, and trophic groups is included.