Background: Heterotopic bone formation (HBF) in the soft tissues surrounding the hip joint is a frequent complication of hip surgery. Non-steroidal anti-inflammatory drugs (NSAIDs) administered in the immediate perioperative period reduce the risk of HBF. However, the magnitude of the effect on HBF, and the effects on other associated outcomes, such as pain and physical function, are uncertain. Objectives: To determine the effects of perioperative NSAID therapy versus control on the risk of HBF and other outcomes in patients undergoing hip arthroplasty. Search methods: We searched the Cochrane Bone, Joint and Muscle Trauma Group specialised register (October 2002), the Cochrane Central Register of Controlled Trials (The Cochrane Library issue 3, 2002), MEDLINE (1966 to October 2002), EMBASE (1988 to 2002 Week 43), CURRENT CONTENTS (1993 Week 27 to 2002 Week 44) and reference lists of articles. We also contacted trialists and drug manufacturers. Selection criteria: All trials which enrolled patients scheduled to undergo hip arthroplasty with random or quasi-random allocation to perioperative NSAID or control and that recorded post-operative radiographically determined HBF. The primary outcome was post-operative radiographic HBF. Secondary outcomes were pain, function (including range of motion), gastro-intestinal and other bleeding complications, and other causes of major morbidity or mortality. Data collection and analysis: Two reviewers independently assessed methodological quality and extracted data. All analyses were conducted on dichotomised outcomes. Main results: Sixteen randomised and two quasi-randomised trials involving a total of 4,763 patients were included. Overall, in 17 trials that examined the effects of medium to high doses of NSAIDs, there was a reduced risk of developing HBF after hip surgery (59% reduction, 95% confidence interval 54% to 64% reduction). In contrast, one large trial examining low-dose aspirin, demonstrated no effect on the risk of HBF (2% reduction, 95% confidence interval 15% reduction to 12% increase). There was strong evidence of differences in the size of the treatment effects observed between the trials examining medium to high doses of NSAIDs, but reasons were not clearly identified. There was a non-significant one third increased risk of gastro-intestinal side effects among patients assigned NSAIDs (29% increase, 95% confidence interval 0% to 76% increase). Most of this increase was due to an increased risk of minor gastro-intestinal complications. Data on the late post-operative outcomes of pain, impaired physical function and range of joint movement were few and no formal overviews of the effects of NSAIDs on these outcomes were possible. Authors' conclusions: Perioperative NSAIDs, apart from low dose aspirin, appear to produce between a one half and two thirds reduction in the risk of HBF. With routine use, such agents may be able to prevent 15-20 cases of HBF among every 100 total hip replacements performed. However, while medium to high doses of perioperative NSAIDs clearly produce a substantial reduction in the incidence of radiographic HBF, there remains some uncertainty about short-term side effects of treatment and substantial uncertainty about effects on long-term clinical outcomes such as chronic pain and impaired physical function. The net effect of routine HBF prophylaxis with NSAIDs requires formal assessment in a randomised trial designed to determine the balance of benefits and risks for all outcomes.