Bacterial cell division in many organisms involves a constricting cytokinetic ring that is orchestrated by the tubulin-like protein FtsZ. FtsZ forms dynamic filaments close to the membrane at the site of division that have recently been shown to treadmill around the division ring, guiding septal wall synthesis. Here, using X-ray crystallography of Staphylococcus aureus SaFtsZ we reveal how an FtsZ can adopt two functionally distinct conformations, open and closed. The open form is found in SaFtsZ filaments formed in crystals and also in soluble filaments of E. coli FtsZ as deduced by cryoEM. The closed form is found within several crystal forms of two non-polymerising SaFtsZ mutants and corresponds to many previous FtsZ structures from other organisms. We argue that FtsZ undergoes a polymerisation-associated conformational switch. We show that such a switch provides explanations for both how treadmilling may occur within a single-stranded filament, and why filament assembly is cooperative.