Commercially-available linear and branched PEIs (LPEI and BPEI) were chemically-modified with carbohydrates and carbohydrate-mimetics to improve biocompatibility. Hydroxyl moieties were installed in a close proximity via reaction of PEI's amines with paraformaldehyde (pF) or glycidol. Mixing PEI with pF led to the formation of hemiaminal moieties as well as N-methylation of the backbone through an Eschweiler-Clarke-type rearrangement. The amount of attached hydroxyl groups depended on the initial amount of pF and the results were in agreement with NMR studies on model reactions with primary and secondary amines. The primary amines of BPEI triggered the ring-opening of glycidol and sugar-containing epoxides, in methanol and at room temperature. PEI chains modified with pF displayed the same cytotoxicity as the parent polymer, unless a sufficient amount of pF was added to trigger N-methylation of the backbone. In contrast, glycidol and sugar-functionalized BPEIs exhibited lower toxicity but similar (if not higher) transfection efficiency as compared to unmodified BPEI.