Nature provides a wide range of inspiration for building mobile micromachines that can navigate through confined heterogenous environments and perform minimally invasive environmental and biomedical operations. For example, microstructures fabricated in the form of bacterial or eukaryotic flagella can act as artificial microswimmers. Due to limitations in their design and material properties, these simple micromachines lack multifunctionality, effective addressability and manoeuvrability in complex environments. Here we develop an origami-inspired rapid prototyping process for building self-folding, magnetically powered micromachines with complex body plans, reconfigurable shape and controllable motility. Selective reprogramming of the mechanical design and magnetic anisotropy of body parts dynamically modulates the swimming characteristics of the micromachines. We find that tail and body morphologies together determine swimming efficiency and, unlike for rigid swimmers, the choice of magnetic field can subtly change the motility of soft microswimmers.