abstract: A magnetic field where all field lines connect between two planes resembles a mathematical braid with an infinite number of strands. Such “magnetic braids” occur in physical plasmas ranging from thermonuclear confinement devices to the coronae of stars. Here we are interested in the dynamical evolution of magnetic braids. Though often close to an ideal, “topology-preserving” evolution, even small amounts of dissipation can lead to large-scale topological changes via magnetic reconnection. We address the open question of how to quantify the evolving topology of a magnetic braid. There are two strands to this research. Firstly, one can derive simple dynamical invariants from a set of “special” magnetic field lines, namely the periodic orbits of the field line mapping. These new constraints have led us to question a long-standing hypothesis for turbulent relaxation in the solar corona. Secondly, one can quantify the topological dissipation using a two-dimensional “topological flux function,” defined on a cross-section. This function is an ideal invariant, and its integral yields a well-known global invariant: the relative magnetic helicity. But--as demonstrated by analysis of a numerical relaxation experiment--the flux function contains much more detailed information about the magnetic structure. In fact, it may be shown to contain all essential topological information.