We present a new iterative method for designing Bragg gratings based on the Levenberg-Marquardt method of minimizing a chi-squared merit function. It is effective for designing both weak and strong gratings and is particularly well suited for unchirped gratings.