Dyes are one of the most common pollutants in wastewater due to their widespread use. Therefore, in order to protect aquatic ecosystems, dyes must be treated in situ and/or in vivo. In this study, we synthesized poly (glycidyl methacrylate) (PGMA) gels and then modified with diethylenetriamine (DETA) and tetraethylenepentamine (TEPA) containing different numbers and lengths amino groups to obtain PGMA-NH2 hydrogels and used in CR adsorption. The adsorption studies were carried out according to batch adsorption procedure. As a result of the study, the contact time was found 40 minutes and the highest adsorption capacity of 196 and 147 mg/g for PGMA-DETA and PGMA-TEPA was reached, respectively. Isotherm and kinetic experiments showed that adsorption obeys the Freundlich isotherm and pseudo-second-order equation. CR dye is an anionic indicator dye. These results showed that PGMA-NH2 hydrogels have significant potential for efficient adsorption of anionic dyes.