A simple, accurate and fast method for synthesizing the physical parameters of a fiber Bragg grating (FBG) structure from its reflectivity is proposed and demonstrated. The method is based on a simulated annealing (SA) optimization algorithm and can be applied over uniform and nonuniform (apodized, chirped) FBGs. The SA technique is specially suited for the complete characterization (including phase characterization) of FBG structures from reflectivity measurements. As an example, the proposed technique is successfully applied to synthesize and characterize an experimental linearly chirped FBG from its measured reflectivity.