T2 is an important MR imaging contrast, including visualizing edema, myocarditis, separating coronary lumen from myocardium, as well as cerebrospinal fluid from gray and white matter. For diagnostic accuracy, it is important to achieve uniform T2-weighting throughout the imaging field-of-view. This is often not achievable because of non-uniform B1, especially at ultra-high magnetic field. This limitation was overcome by numerical optimization of a T2 preparation module. The optimal control T2 preparation pulse achieved good T2 contrast despite ±40% B1 variation and was scalable to achieve different T2 weighting times. Evaluation was done with Zero-TE imaging in the human brain at 3T.