We demonstrate systematic control of mechanical nonlinearities in micro-electromechanical (MEMS) resonators using shape optimization methods. This approach generates beams with non-uniform profiles, which have nonlinearities and frequencies that differ from uniform beams. A set of bridge-type microbeams with selected variable profiles that directly affect the nonlinear characteristics of in-plane vibrations was designed and characterized. Experimental results have demonstrated that these shape changes result in more than a three-fold increase and a two-fold reduction in the Duffing nonlinearity due to resonator mid-line stretching. The manipulation of this nonlinearity has significant interest in many applications, including precise mass sensing, accurate measurement of angular rates, and timekeeping. Published by AIP Publishing.