In recent years there has been a significant increase in the use of graphs as tools for the representation of information. It is very important to preserve the privacy of users when they want to publish some of this information, especially in the case of social networks. In this case it is essential to apply an anonymizing process in the data that allows to preserve the privacy of the users. This paper presents a new algorithm for graph anonymization, called Genetic Graph Anonymization (GGA), based on the modification of edges to preserve the k-anonymity model.