Aims. The cold molecular gas mass is one of the crucial, yet challenging, parameters in galaxy evolution studies. Here, we introduce a new calibration and a method for estimating molecular gas masses using mid-infrared (MIR) photometry. This topic is timely as the James Webb Space Telescope (JWST) now allows us to detect the MIR emission of typical main-sequence galaxies across a wide range of masses and star formation rates with modest time investments. Additionally, this Letter highlights the strong synergy between ALMA and JWST for studies of dust and gas at cosmic noon. Methods. We combined a sample of 14 main-sequence galaxies at z = 1 − 3 with robust CO detections and multi-band MIR photometry, along with a literature sample at z = 0 − 4 with CO and polycyclic aromatic hydrocarbon (PAH) spectroscopy, to study the relationship between PAH, CO(1–0), and total IR luminosities. PAH luminosities are derived by modelling a wealth of rest-frame UV to sub-millimetre data. The new z = 1 − 3 sample extends previous high-z studies to PAH and CO luminosities that are about an order of magnitude lower, into the regime of local starbursts, for the first time. Results. The PAH-to-CO luminosity ratio remains constant across a wide range of luminosities, for various galaxy types, and throughout the explored redshift range. In contrast, the PAH-to-IR and CO-to-IR luminosity ratios deviate from a constant value at high IR luminosities. The intrinsic scatter in the L(PAH)–L′(CO) relation is 0.21 dex, with a median of 1.40 and a power-law slope of 1.07 ± 0.04. Both the PAH–IR and CO–IR relations are sub-linear. Given the tight and uniform PAH–CO relation over ∼3 orders of magnitude, we provide a recipe for estimating the cold molecular gas mass of galaxies from PAH luminosities, with a PAH-to-molecular gas conversion factor of αPAH7.7 = (3.08 ± 1.08)(4.3/αCO) M⊙/L⊙. This method opens a new window to explore the gas content of galaxies beyond the local Universe using multi-wavelength JWST/MIRI imaging.