In the machining of complex parts with free-formed surfaces, robots are widely employed due to their advantages of a large operating space and high flexibility. The industrial robot with 6 degrees-of-freedom (DOF) has an extra redundant degree of freedom around the tool axis, which does not affect the tool pose related to the workpieces but influences the robot's joint configuration. The motion performance and machining efficiency can be improved by optimizing the redundant angle. Based on this, an analytical path smoothing algorithm for 6-DOF robots with the consideration of redundant kinematics is proposed to improve the robot's dynamic performance. The tool tip position and orientation are fit with the analytical 5th degree Pythagorean-Hodograph (PH) spline to satisfy C2 continuity, respectively. Therefore, the 5th degree polynomial spline with minimum acceleration is adopted to fit the redundant rotation angle and the tool tip position arc length. Then the tool path position spline, tool orientation spline, and redundant rotary angle spline are all synchronized to the tool position displacement, which makes it convenient to do interpolation along the tool path. The minimum time feed planning method considering the joint dynamic constraints is adopted to interpolate motion commands. Experimental results show that the motion efficiency of the robot in the same test path increases by 33.97 % compared with the regular spline without considering acceleration of the redundant angle spline. Meanwhile, the proposed tool path smoothing method effectively mitigates the joint vibration with a maximum reduction of 65.05 %, without sacrificing motion accuracy.