A nondestructive, accurate and fast method for measuring the grating parameters of relief gratings is proposed in this paper. At first, the 0th diffractive transmission efficiency spectrum from 600nm to 700nm is obtained according to a certain relief grating model with the rigorous coupled-wave analysis (RCWA). Under the condition of normal incidence, the 0th diffractive transmission efficiency will behave as a function of duty cycles, depths and profiles of grooves for both TE and TM polarization. Then the data of the 0th diffractive transmission efficiency spectrum for TE polarization is regarded as measured values of simulation. Finally, grating parameters are obtained with the library matching method.Theoretical analysis and numerical simulation results demonstrate the feasibility and validity of the proposed method.Being accurate, repeatable and nondestructive, this kind of method will obtain the grating parameters quickly in practice without comprehensive and expensive but only commonly spectrometer that will be convenient for measurement of grating parameters in situ.