We investigate the tensile stress in freely suspended nanomechanical string resonators, and observe a material-independent dependence on the resonator length. We compare strongly stressed sting resonators fabricated from four different material systems based on amorphous silicon nitride, crystalline silicon carbide as well as crystalline indium gallium phosphide. The tensile stress is found to increase by approximately 50 % for shorter resonators. We establish a simple elastic model to describe the observed length dependence of the tensile stress. The model accurately describes our experimental data. This opens a perspective for stress-engineering the mechanical quality factor of nanomechanical string resonators.