A new genetic algorithm to detect communities in social networks is presented. The algorithm uses a fitness function able to identify groups of nodes in the network having dense intra-connections, and sparse inter-connections. The variation operators employed are suitably adapted to take into account the actual links among the nodes. These modified operators makes the method efficient because the space of possible solutions is sensibly reduced. Experiments on a real life network show the capability of the method to successfully identify the network structure. Categories and Subject Descriptors H.2.8 [Database Managment]: Database Applications — Data Mining; I.2.2 [Artificial Intelligence]: Automatic Programming; I.5.3 [Computing Methodologies]: Pattern Recognition—Clustering General Terms Algorithms Keywords Genetic Algorithms, Data Mining, Clustering, Social Networks.