For the nanostructured thin films, the study of surface physical parameters is often of crucial importance. For example, the transport properties of ZnO thin film are strongly affected by the geometry of this film. In this study sol–gel ZnO thin film was spin coated on glass substrate. The inverse problem of thin film characterization is formulated as a parameter identification problem in which a set of parameters corresponding to the thin film property can be found by minimizing fitness functions formulated using theoretical and experimental X-ray reflectivity. Atomic force microscopy (AFM) measurements used as an independent procedure for extracting structural parameters of the film and accurate interpretation of X-ray reflectivity data. After applying Fractal calculations on the AFM measured data the Genetic algorithm (GA) method was applied for extracting other important structural parameters. Optimization of specular X-ray reflectivity by GA method gives information along the depth such as thickness, roughness, and electron density profile of layers in the film.