The present invention relates to a method for inhibiting oxidative damage of islet beta cells in vivo in a subject by administering to the subject a therapeutically effective amount of heparan sulfate capable of protecting islet beta cells from reactive oxygen species or in vitro by exposing isolated islet beta cells, prior to transplantation, to a concentration of heparan sulfate that protects them from reactive oxygen species.