The casing treatment is an effective method for increasing the stall margin of compressors and enhancing the flow distribution at the blades tip. The present numerical study focuses on making an optimization of the casing groove parameters which can enhance the centrifugal compressor performance during stall. The casing grooves parameters considered are the groove cross section aspect ratio (the groove height to width ratio), groove location, and the number of grooves. Five groove aspect ratios were considered ranging from 0.2 to 1.8. Three groove locations were studied: at full blades leading edge, at splitter blades leading edge, and after the splitter blades leading edge by a distance equals to the distance between the first and second groove locations. Comparisons were made among different cases with number of grooves starting from one up to seven grooves located at the most effective locations and have the optimum cross section dimensions as deduced from the results of the groove aspect ratio and groove location optimization. Results showed that by using groove aspect ratio less than one, the reinjected groove flow is relatively weak but when the aspect ratio is equal to one, there is enough space inside the groove for the flow to circulate and generate the reinjected groove flow with higher velocities. When the groove aspect ratio was increased to be more than one, the reinjected flow velocity was increased slightly and its effective area was increased in the circumferential direction. Results also indicated that the best location for the groove is at the full blades leading edge because the stall area can be minimized and controlled in a better way comparing with the other groove locations. Results showed that by increasing the number of grooves, the surge margin (SM) increases and the isentropic efficiency decreases, but the stall area at the shroud surface decreases in size and its location is shifted toward the blades trailing edge.