Background Tranexamic acid reduces surgical bleeding and decreases mortality in patients with traumatic extracranial bleeding. Intracranial bleeding is common after traumatic brain injury (TBI) and can cause brain herniation and death. We aimed to assess the effects of tranexamic acid in patients with TBI. Methods This randomised, placebo-controlled trial was done in 175 hospitals in 29 countries. Adults with TBI who were within 3 h of injury, had a Glasgow Coma Scale (GCS) score of 12 or lower or any intracranial bleeding on CT scan, and no major extracranial bleeding were eligible. The time window for eligibility was originally 8 h but in 2016 the protocol was changed to limit recruitment to patients within 3 h of injury. This change was made blind to the trial data, in response to external evidence suggesting that delayed treatment is unlikely to be effective. We randomly assigned (1:1) patients to receive tranexamic acid (loading dose 1 g over 10 min then infusion of 1 g over 8 h) or matching placebo. Patients were assigned by selecting a numbered treatment pack from a box containing eight packs that were identical apart from the pack number. Patients, caregivers, and those assessing outcomes were masked to allocation. The primary outcome was head injury-related death in hospital within 28 days of injury in patients treated within 3 h of injury. We prespecified a sensitivity analysis that excluded patients with a GCS score of 3 and those with bilateral unreactive pupils at baseline. All analyses were done by intention to treat. This trial was registered with ISRCTN (ISRCTN15088122), ClinicalTrials.gov (NCT01402882), EudraCT (2011-003669-14), and the Pan African Clinical Trial Registry (PACTR20121000441277). Results Between July 20, 2012, and Jan 31, 2019, we randomly allocated 12 737 patients with TBI to receive tranexamic acid (6406 [50·3%] or placebo [6331 [49·7%], of whom 9202 (72·2%) patients were treated within 3 h of injury. Among patients treated within 3 h of injury, the risk of head injury-related death was 18·5% in the tranexamic acid group versus 19·8% in the placebo group (855 vs 892 events; risk ratio [RR] 0·94 [95% CI 0·86-1·02]). In the prespecified sensitivity analysis that excluded patients with a GCS score of 3 or bilateral unreactive pupils at baseline, the risk of head injury-related death was 12·5% in the tranexamic acid group versus 14·0% in the placebo group (485 vs 525 events; RR 0·89 [95% CI 0·80-1·00]). The risk of head injury-related death reduced with tranexamic acid in patients with mild-to-moderate head injury (RR 0·78 [95% CI 0·64-0·95]) but not in patients with severe head injury (0·99 [95% CI 0·91-1·07]; p value for heterogeneity 0·030). Early treatment was more effective than was later treatment in patients with mild and moderate head injury (p=0·005) but time to treatment had no obvious effect in patients with severe head injury (p=0·73). The risk of vascular occlusive events was similar in the tranexamic acid and placebo groups (RR 0·98 (0·74-1·28). The risk of seizures was also similar between groups (1·09 [95% CI 0·90-1·33]). Interpretation Our results show that tranexamic acid is safe in patients with TBI and that treatment within 3 h of injury reduces head injury-related death. Patients should be treated as soon as possible after injury. Funding National Institute for Health Research Health Technology Assessment, JP Moulton Charitable Trust, Department of Health and Social Care, Department for International Development, Global Challenges Research Fund, Medical Research Council, and Wellcome Trust (Joint Global Health Trials scheme).