We construct a localization for operads with respect to one-ary operations based on the Dwyer-Kan hammock localization. For an operad O and a sub-monoid of one-ary operations W we associate an operad LO and a canonical map O to LO which takes elements in W to homotopy invertible operations. Furthermore, we give a functor from the category of O-algebras to the category of LO-algebras satisfying an appropriate universal property.