Habitat fragmentation is known to cause genetic differentiation between small populations of rare species and decrease genetic variation within such populations. However, common species with recently fragmented populations have rarely been studied in this context. We investigated genetic variation and its relationship to population size and geographical isolation of populations of the common plant species, Lychnis flos-cuculi L., in fragmented fen grasslands. We analysed 467 plants from 28 L. flos-cuculi populations of different sizes (60 000–54 000 flowering individuals) in northeastern Switzerland using seven polymorphic microsatellite loci. Genetic differentiation between populations is small (FST = 0.022; amova; P < 0.001), suggesting that gene flow among populations is still high or that habitat fragmentation is too recent to result in pronounced differentiation. Observed heterozygosity (HO = 0.44) significantly deviates from Hardy–Weinberg equilibrium, and within-population inbreeding coefficient FIS is high (0.30–0.59), indicating a mixed mating breeding system with substantial inbreeding in L. flos-cuculi. Gene diversity is the only measure of genetic variation which decreased with decreasing population size (R = 0.42; P < 0.05). While our results do not indicate pronounced effects of habitat fragmentation on genetic variation in the still common L. flos-cuculi, the lower gene diversity of smaller populations suggests that the species is not entirely unaffected.