New hydrogels were prepared from diepoxy‐terminated poly(ethylene glycol)s of approximate molecular weights 600, 1000, 2000, and 4000 Da and aliphatic primary diamines with different numbers of carbon atoms (ethylenediamine, 1,4‐diaminobutane, hexamethylenediamine, 1,8‐octanediamine, 1,10‐decanediamine, 1,12‐dodecanediamine), in water or ethanol–water mixture, depending on the amine solubility. The swelling behavior of these gels was tested in distilled water/aqueous solution at constant temperature and the equilibrium swelling degree (ESD) was determined for structurally different hydrogels and under various environmental conditions. It was shown that ESD was influenced by the molecular weight of PEG oligomers, amine/epoxy groups mole ratio, amine chain length, temperature, pH, and concentration of salts present in the swelling medium. Higher ESDs were obtained for either longer‐chain PEGs, non‐stoichiometric amine/epoxy groups ratio, shorter amines, acidic pH, lower temperatures, or in the absence of salts. Copyright © 2009 John Wiley & Sons, Ltd.