New antibiotics are desperately needed: without them, antimicrobial resistance is predicted to kill more people than cancer. We use our high-resolution imaging techniques, developed to image DNA with nanometre resolution, to determine the mechanism of action of naturally occurring and engineered antimicrobial peptides, the membrane attack complex - a pore-forming protein from our immune system, and novel DNA-based nanobarrels. Through rational sequence design, the mechanism of action of many of these antimicrobials can be dramatically altered, improving both the speed and potency of bacterial killing.