STUDY QUESTION: Which is better, Tramadol or Celecoxib, in reducing pain associated with outpatient hysteroscopy? SUMMARY ANSWER: Both Tramadol and Celecoxib are effective in reducing pain associated with outpatient hysteroscopy but Celecoxib may be better tolerated. WHAT IS KNOWN ALREADY: Pain is the most common cause of failure of outpatient hysteroscopy. A systematic review and meta-analysis showed that local anaesthetics were effective in reducing pain associated with hysteroscopy but there was insufficient evidence to support the use of oral analgesics, opioids and non-steroidal anti-inflammatory drugs, to reduce hysteroscopy-associated pain and further studies were recommended. STUDY DESIGN, SIZE, DURATION: This was a randomized double-blind placebo-controlled trial with balanced randomization (allocation ratio 1:1:1) conducted in a university hospital from May 2014 to November 2014. PARTICIPANTS/MATERIALS, SETTING, METHODS:Two hundred and ten women who had diagnostic outpatient hysteroscopy were randomly divided into three equal groups: Group 1 received oral Tramadol 100 mg, group 2 received Celecoxib 200 mg and group 3 received an oral placebo. All the drugs were given 1 h before the procedure. A patient's perception of pain was assessed during the procedure, immediately afterwards and 30 min after the procedure with the use of a visual analogue scale (VAS). MAIN RESULTS AND THE ROLE OF CHANCE: There was a significant difference in the pain scores among the groups during the procedure, immediately afterwards and 30 min after the procedure (P < 0.001, 0.001, < 0.001 respectively). Tramadol had significantly lower pain scores when compared with the placebo during the procedure (mean difference = 1.54, 95% confidence interval (CI) (0.86, 2.22), P < 0.001), immediately after the procedure (mean difference = 1.09; 95% CI (0.5, 1.68), P < 0.001) and 30 min later (mean difference = 0.95, 95% CI (0.48, 1.41), P < 0.001). Celecoxib administration also led to significantly lower pain scores than the placebo during the procedure (mean difference = 1.28, 95% CI (0.62, 1.94), P < 0.001), immediately after the procedure (mean difference = 0.72; 95% CI (0.13, 1.32), P = 0.016) and 30 min later (mean difference = 0.77, 95% CI (0.3, 1.24), P = 0.001). There were no significant differences in pain scores between Tramadol and Celecoxib at any time. Time until no pain differed significantly among the groups (P = 0.01); it was shorter with both Tramadol and Celecoxib groups when compared with placebo (P = 0.002 and 0.046, respectively). The procedure failed to be completed in one patient in the placebo group but no failure to complete the procedure occurred in Tramadol and Celecoxib groups. Four women in the Tramadol group reported nausea but no side effects were reported with Celecoxib group and no complications were reported in any group of patients. LIMITATIONS, REASONS FOR CAUTION: All results were based on the subjective perception of pain, which varies among individuals and is related to the individuals' previous pain experience and level of anxiety. WIDER IMPLICATIONS OF THE FINDINGS: Tramadol and Celecoxib are effective in reducing pain in outpatient hysteroscopy. Celecoxib may be better tolerated as no side effects were reported in the study, however further research on a larger sample size is required before drawing firm conclusions about lack of side effects.