Co-translational folding is a fundamental process for the efficient biosynthesis of nascent polypeptides that emerge through the ribosome exit tunnel. To understand how this process is modulated by the shape and surface of the narrow tunnel, we have rationally engineered three exit tunnel protein loops (uL22, uL23 and uL24) of the 70S ribosome by CRISPR/Cas9 gene editing, and studied the co-translational folding of an immunoglobulin-like filamin domain (FLN5). Our thermodynamics measurements employing 19F/15N/methyl-TROSY NMR spectroscopy together with cryo-EM and molecular dynamics simulations reveal how the variations in the lengths of the loops present across species exert their distinct effects on the free energy of FLN5 folding. A concerted interplay of the uL23 and uL24 loops is sufficient to alter co-translational folding energetics, which we highlight by the opposite folding outcomes resulting from their extensions. These subtle modulations occur through a combination of the steric effects relating to the shape of the tunnel, the dynamic interactions between the ribosome surface and the unfolded nascent chain, and its altered exit pathway within the vestibule. These results illustrate the role of the exit tunnel structure in co-translational folding, and provide principles for how to remodel it to elicit a desired folding outcome.