We report the structure–activity relationship in the antimicrobial activity of linear and branched poly(ethylene imine)s (L‐ and B‐PEIs) with a range of molecular weights (MWs) (500–12 000). Both L‐ and B‐PEIs displayed enhanced activity against Staphylococcus aureus over Escherichia coli. Both B‐ and L‐PEIs did not cause any significant permeabilization of E. coli cytoplasmic membrane. L‐PEIs induced depolarization of S. aureus membrane although B‐PEIs did not. The low MW B‐PEIs caused little or no hemolysis while L‐PEIs are hemolytic. The low MW B‐PEIs are less cytotoxic to human HEp‐2 cells than other PEIs. However, they induced significant cell viability reduction after 24 h incubation. The results presented here highlight the interplay between polymer size and structure on activity.