Globalization is defined for individuals as their connectivity in global networks. Social identity is conceptualized as attachment and identification with a group. We measure individual involvement with global networks and local, national, and global social identity through a questionnaire. Propensity to cooperate is measured in experiments involving local and global others. Firstly, we analyze possible determinants of global social identity. Overall, attachment to global identity is significantly lower than national and local identity, but there is a significant positive correlation between global social identity and an index of individual global connectivity. Secondly, we find a significant mediating effect of global social identity between individual global connectivity and propensity to cooperate at the global level. This is consistent with a cosmopolitan hypothesis of how participation in global networks reshapes social identity: Increased participation in global networks increases global social identity and this in turn increases propensity to cooperate with others. We also show that this model receives more support than alternative models substituting either propensity to associate with others or general generosity for individual global connectivity. We further demonstrate that more globalized individuals do not reduce contributions to local accounts while increasing contributions to global accounts, but rather are overall more generous. Finally, we find that the effect of global social identity on cooperation is significantly stronger in countries at a relatively low stage of globalization, compared to more globalized countries.