Dimensional synthesis of mechanisms to trace given points is an important issue in mechanism and machine science. Having no exact solution makes this issue an optimization problem. This study offers an optimization approach for the dimensional synthesis of planar mechanisms. Four-bar mechanisms having one degree of freedom (DOF) are chosen as the configurations. The proposed method is implemented by establishing the objective functions with specified constraints and searching for the results by using an optimization algorithm. Genetic Algorithm (GA) in Optimization Toolbox-Matlab® is selected as a solver. Different types of four-bar mechanisms like crank-rocker and double-crank including different target points are performed. Mechanisms are depicted by resulted parameters and a Matlab® script prepared plays their animations. As a result, it is proved that the mechanisms whose dimensional properties are obtained by the GA solver have a good tracing capability for the desired paths. This study has the property of being a design guide. Its application is not limited to four bar mechanism. Planar mechanisms with different configurations can be easily synthesized by using this technique.