Different polyvinyl acetate ratios were mixed with acrylamide and nanoparticle ferric chloride and then exposed to varying doses of gamma irradiation. The optimal gamma irradiation dose for achieving final cross-linking and obtaining a superabsorbent hydrogel was determined to be 20 kGy. The hydrogel was foamed to create a three-dimensional structure to enhance groundwater decontamination efficiency. The resulting polymer was chemically, thermally, and morphologically characterized. The porosity was evaluated using the Brunauer, Emmett, and Teller method (BET) and Positron Annihilation Lifetime Spectroscopy (PALS). The foam exhibited significantly greater water swelling compared to the hydrogel with the same composition, increasing it by a factor of 4,818. When comparing the foam, hydrogel, and commercially available poly electrolytes (polyacrylamide) in terms of electric conductivity (EC), ion exchange capacity (IEC), and hardness, the foam displayed exceptional fantastic properties. Many groundwater patterns were studied, such as turbidity, pH, total dissolved solids (TDS), chemical oxygen demand (COD), biological oxygen demand (BOD), turbidity bacterial cells’ disinfection, and rotavirus.