Background: Herniorrhaphy is the most common inguinal surgery in children. Several methods such as caudal block, ilioinguinal iliohypogastric block, and wound infiltration have been studied for postoperative pain management in these patients. Caudal block is common in pediatrics. However, ilioinguinal iliohypogastric block is effective and less invasive. Previous studies have shown different comparative results regarding these blocks. This study compares the analgesic effect of caudal and bilateral ilioinguinal iliohypogastric block with ropivacaine in children. Methods: This study is a randomized double-blind clinical trial. A total number of 66 patients aged between 1-7 years that volunteered for bilateral inguinal hernia repair were randomly assigned to two groups. After general anesthesia, caudal block with 1cc/kg ropivacaine 0.2% was performed for 33 patients and sonography-guided ilioinguinal iliohypogastric block with 0.1 cc/kg ropivacaine for each side was considered for another group. Hemodynamic parameters (systolic blood pressure, diastolic blood pressure, and heart rate) during anesthesia, pain score (CHEOPS), delirium score (PAED), nurses’ satisfaction score (RN), need for additional narcotic, recovery time, and complications were compared in these two groups. Results: There was no statistically significant difference between the two groups in terms of hemodynamic parameters during the anesthesia process. Furthermore, the two groups had no statistically significant difference in CHEOPS score (6.27 in ilioinguinal block and 5.70 in caudal block, P=0.061), PAED score (5.64 vs 5.30, P=0.144), and RN satisfaction score. However, the need for narcotics, mean recovery time, and block complications were comparable in two groups. Conclusion: Caudal block and ilioinguinal block are equally effective for post herniorrhaphy pain and emergence agitation management in pediatrics. Additionally, no differences were observed in complications. It is recommended that the study be performed with a larger sample size.