Abstract In order to improve head-collision safety of flexible joint manipulators, the optimization method of flexible joint manipulator configuration based on the manipulator safety index and gradient projection method is proposed, and the methods of determining the safety collision direction and the safety configuration are given. Firstly, the equivalent model of head-collision of the flexible joint manipulator is established. The equivalent model takes into account the influence of the flexibility of the manipulator joint. Then, the method of determining the direction of safety collision under fixed configuration and the method of determining the safety configuration under fixed collision direction are given respectively. Based on the manipulator safety index, the gradient projection algorithm is used to optimize the configuration of continuous path of the redundant flexible joint manipulator. Finally, a closed-loop simulation system is established. The effectiveness of using the gradient projection method to reduce the safety index of the manipulator is verified by a plane 3-DOF manipulator and a space 7-DOF manipulator respectively. Two simulation results show that the optimized safety index of the manipulator is reduced by 83.86% and 26.42%, respectively.