The design of a pharmaceutical cocrystal is based on the identification of specific hydrogen-bond donor and acceptor groups in active pharmaceutical ingredients (APIs) in order to choose a `complementary interacting' molecule that can act as an efficient coformer. 5-Fluorouracil (5FU) is a pyrimidine derivative with two N-H donors and C=O acceptors and shows a diversity of hydrogen-bonding motifs. Two 1:1 cocrystals of 5-fluorouracil (5FU), namely 5-fluorouracil-4-methylbenzoic acid (5FU-MBA), CHFNO·CHO, (I), and 5-fluorouracil-3-nitrobenzoic acid (5FU-NBA), CHFNO·CHNO, (II), have been prepared and characterized by single-crystal X-ray diffraction. In (I), the MBA molecules form carboxylic acid dimers [R(8) homosynthon]. Similarly, the 5FU molecules form two types of base pair via a pair of N-H...O hydrogen bonds [R(8) homosynthon]. In (II), 5FU interacts with the carboxylic acid group of NBA via N-H...O and O-H...O hydrogen bonds, generating an R(8) ring motif (heterosynthon). Furthermore, the 5FU molecules form base pairs [R(8) homosynthon] via N-H...O hydrogen bonds. Both of the crystal structures are stabilized by C-H...F interactions.