Spider species are important for maintaining ecological balance, controlling insect populations, and providing potential sources of medicinal compounds. Highlighting the importance of spider species, the present study was aimed at exploring the diversity of spider fauna and species richness in various habitats in District Mardan, Khyber Pakhtunkhwa, Pakistan, from March 2021 to December 2021. Spiders were collected through different methods: pitfall traps, cryptic searching, ground hand collection, aerial hand collection, and vegetation beating. Then, the captured spiders were washed in alcohol and preserved in a combination of 80% alcohol and 20% glycerol for further observation. Identification was carried out with the help of available spider identification keys and literature. A total of 578 specimens representing 29 species from 17 families and 26 genera were collected and identified. Family Lycosidae was the most dominant family (13.49%), followed by Salticidae (10.2%), Araneidae (8.47%), Tetragnathidae (7.61%), Pholicidae (6.4%), Oxyopidae (5.88%), Thomisidae (5.7%), Clubionidae (5.53%), Sicariidae (5.19%), Scytodidae (5.01%), Corinnidae (4.67%), Agelenidae (4.32%), Cheiracanthiidae and Sparassidae (4.15%), Oecobiidae and Hersiliidae (3.97%) and Theridiidae was the rarest among all (1.21%). The most commonly identified species are Hippasa partita, Lycosa poonaesis, Lycosa terrestris, Draposa oakleyi, Plexippus paykulli, Menemerus nigli, Thyene imperialis, Thyene bivittate and Hasarius adansoni. Argiope versicolor, Neoscona theisi, Tetragnatha extensa, Crossopriza lyoni, and Oxyopes Javanus. During the present study, it was observed that spider species were abundantly found in warm areas from May to August, which demonstrates that the spider fauna of the study area is very rich but has yet to be explored.