This study presents a soft robotic gripper for grasping irregular objects. The optimal design is based on the proposed topology optimization and size optimization methods with the objective to maximize the mechanical advantage (MA, which is defined as the ratio of output force to the input force) of the analyzed compliant mechanism. The optimal design is prototyped using silicon rubber material. Experimental tests including MA test, geometric advantage (GA, which is defined as the ratio of output displacement to the input displacement) test, adaptability test, and grasping test are carried out to investigate the design. A performance index has also been proposed to evaluate the grasping performance of the grippers. The results show the developed gripper is with the highest performance index, which represents the developed gripper is with better adaptability, faster response, higher payload and stability in overall.