International audienceIn the last two decades, many laboratory experiments have tested the hypothesis that groups that are composed of "like-minded" subjects maintain higher cooperation levels than randomly formed groups. We survey the growing literature on group formation in the context of three types of social dilemma games: public goods games, common pool resources, and the prisoner's dilemma. The 62 selected papers study the effect of different sorting mechanisms-endogenous, endogenous with the option to play the game, and exogenous-on cooperation rates. For each sorting mechanism, we highlight the main design features and findings. Our survey shows that with the endogenous sorting, cooperation is fragile since cooperators are constantly chased by free-riders. Additional institutional arrangements are needed to ensure that cooperative behaviors can survive over time. As for the exogenous sorting mechanism, the dimension on which people are sorted affects the homogeneity of the group and therefore the level of cooperation. The surveyed literature does not directly compare the effect of the two sorting mechanisms. To do so, we conduct a meta-analysis using a panel of 241 group-level observations from 9 papers. We find that the endogenous sorting backed with various institutional arrangements prevents the decay in cooperation over time, which is not the case for the exogenous sorting