Background: Needle pain due to routine vaccination is an important factor contributing to low vaccine adherence and immunization coverage. Prophylactic oral analgesics can address this important issue of needle pain related to vaccination. Paracetamol and mefenamic acid are commonly used nonsteroidal anti-inflammatory drugs for pain relief, but there is little published literature on whether the same can be used for needle pain related to vaccination. Objectives: This study was planned to compare the efficacy of oral mefenamic acid and paracetamol over placebo as a prophylactic analgesic during vaccination and prophylactic antipyretic during the post-vaccination period. Designs: Three-arm, triple-blind, randomized controlled trial. Methods: This study was conducted at the outpatient department of a tertiary-level medical college in South India from January 2021 to June 2022. In this three-arm interventional trial, each arm had either a single dose of placebo or mefenamic acid (4 mg/kg/dose) or paracetamol (10 mg/kg/dose). These medicines were administered orally 30 min before vaccination to reduce needle pain. Main outcome and measures: Outcome was measured with the change of FLACC (Face, Leg, Activity, Cry, Consolability) scoring at the time of vaccination, subsequently at 15 and 30 min of vaccination in all three groups. Appearance of fever, grade of fever, and need for antipyretics 24 h after vaccination were also noted. Results: There was a significant difference in FLACC scores at the time of administration ( p = 0.010) and at 15 min ( p = 0.014) with mefenamic acid compared to placebo. Although the paracetamol group showed a difference when compared to the placebo, it was not significant at the time of administration ( p = 0.401), at 15 min ( p = 0.451), or 30 min ( p = 0.892) post-vaccination. The appearance of fever, grade of fever, and use of antipyretic up to 24 h post-vaccination had no significant difference among any of the three groups. Conclusion: Mefenamic acid was more potent than placebo for pre-vaccination pain prophylaxis in children. There was no difference in the appearance of fever and its grade among the three groups. The promising results from this trial warrant further large-scale studies to recommend a single oral dose of mefenamic acid to tackle needle pain related to vaccination in children to improve vaccine adherence and coverage. Trial registration: CTRI (Clinical trials registry-India) (CTRI/2021/01/030239). [Date of Commencement: 13 Jan 2021, Date of last recruitment: 30 June 2022 (now closed for new participants)]