Pertussis vaccination with 4–5 doses of acellular vaccines is recommended in Spain to all children at 2 months to 6 years of age. The effectiveness of the acellular pertussis vaccination was assessed in this study by comparing the incidence of secondary pertussis in vaccinated (4–5 doses) and unvaccinated or partially vaccinated (0–3 doses) household contacts 1–9 years old of confirmed cases of pertussis in Spain in 2012–13. Eighty-five percent of contacts had been vaccinated with 4–5 doses of acellular pertussis vaccines. During the 2-year study period, 64 cases of secondary pertussis were detected among 405 household contacts 1–9 years old: 47 among vaccinated and 17 among unvaccinated or partially vaccinated contacts. The effectiveness for preventing secondary pertussis, calculated as 1 minus the relative risk (RR) of secondary pertussis in vaccinated vs. unvaccinated/partially vaccinated contacts, was 50 % [95 % confidence interval (CI): 19–69 %, p < 0.01] when household contacts were vaccinated using DTaP, Tdap, hexavalent or heptavalent vaccines, and it was 51.3 % (95 % CI: 21–70 %, p < 0.01) when they were vaccinated using DTaP or TdaP vaccines. The effectiveness adjusted for age, sex, pertussis chemotherapy and type of household contact was 58.6 % (95 % CI: 17–79 %, p < 0.05) when contacts were vaccinated using available acellular vaccines, and it was 59.6 % (95 % CI: 18–80 %, p < 0.01) when they were vaccinated using DTaP vaccines. Acellular pertussis vaccination during childhood was effective for preventing secondary pertussis in household contacts 1–9 years old of pertussis cases in Catalonia and Navarra, Spain.