Keep it clean! The extraordinary antibacterial property of mesoporous titania films is discovered. The inactivation effect of bacteria is determined by several significant factors such as surface area, titania phase, anatase crystallinity, and surface morphology, which can be controlled by the applied calcination temperatures.