Parental care is costly, thus theory predicts that parents should avoid caring for unrelated offspring. However, alloparenting has been reported in many taxa because it may increase the caregiver mating success or offspring survival. We experimentally investigated the existence of allopaternal care in two glassfrog species, Hyalinobatrachium chirripoi and Centrolene peristicta, and discussed possible costs and benefits. Males mated with multiple females and cared for clutches, while continued to call. In the field, we randomly placed unrelated clutches in the territory of males already caring for their clutches and in the territory of non-attending males. Attending males adopted unrelated clutches, whereas non-attending males abandoned their territories. Once males adopted unrelated offspring, they cared for all clutches in a similar frequency and gained new clutches. Alloparenting was context-dependent, as only males already caring for their clutches adopted unrelated ones. We suggest that steroid hormonal levels might mediate the adoption of unrelated offspring by attending males. Additionally, our results suggest that males do not directly discriminate between related and unrelated offspring. Alloparenting has been widely investigated in different vertebrates, except for amphibians. Thus, our study sheds light on the roles of alloparenting for offspring survival and mating success in this group.