This paper optimizes the linkage parameters of the palletizing robot to ensure that the stack is completely located in the working space of the robot. By changing the values of l2, l3 and joint angle θ3, the workspace measurements of xyz, xOz of the robot were calculated by Matlab programming according to the kinematics equation, and the linkage parameters that meet the conditions were selected through comparison and analysis. The results show that the range of θ3 coincides the requirements, so it is no need to be optimized. And when the length of l2 and l3 is 2290 mm, the maximum workspace of palletizing robot contains the task workspace. After the optimized design of linkage parameters, the workspace of the robot can meet work requirements.