Purpose This work explores how recipients’ identity influences givers’ choice of charitable gifts, their propensity to deviate from gifting registries and how it impacts social ties. Design/methodology/approach We conducted five experiments involving diverse charities to explore the above effect, investigate the mediating role of a warm-glow effect and examine the moderating effect of social closeness and anonymity on gift preferences. Findings Givers deviate from the registry in favor of alternatives that are congruent with the recipient’s identity due to the givers’ desire to gift a warm-glow effect. Socially close givers are more likely to deviate from the gift registry to enhance social ties. Recipients receive a higher warm-glow effect when distant givers give unrequested identity-congruous gifts, thus improving social relationships. Practical implications This study will help organizations determine which identities a specific charity should highlight in its campaigns. Marketers can encourage consumers to prefer charitable gifts by emphasizing the relational and warm-glow benefits. Originality/value This is the first study to examine the effect of the recipient’s identity on givers’ preference for charitable gifts. Specifically, while giving charitable gifts, givers are likelier to donate to a charity whose identity is congruent with the recipient.