There is an inherent relationship between the shape and the corresponding stress intensity factor (SIF) distribution of a crack. A typical inverse problem of linear elastic fracture mechanics about a crack, i.e. to predict the shape of a crack assuming that some information of SIF distribution is known, is presented. A finite-element based numerical procedure is used to determine the shape, correspondingly the SIF, of a mode-I planar crack based on a specified SIF distribution. The crack front is modeled using cubic splines, which are determined by a number of control-points. The crack front shape is achieved iteratively by moving control-points based on a gradientless algorithm. Numerical examples for planar cracks in through-cracked and surface-cracked plates with finite thickness and width are presented to show the validity and practicability of the proposed method. The SIFs obtained by present method are compared with the known solutions for cracks with same dimensions. The presented method is considered to be a promising alternative to the evaluation of SIFs and the prediction of shape evolution for fatigue cracks.