Quantum registers of nuclear spins coupled to electron spins of individual solid-state defects are a promising platform for quantum information processing. Pioneering experiments selected defects with favourably located nuclear spins with particularly strong hyperfine couplings. To progress towards large-scale applications, larger and deterministically available nuclear registers are highly desirable. Here, we realize universal control over multi-qubit spin registers by harnessing abundant weakly coupled nuclear spins. We use the electron spin of a nitrogen-vacancy centre in diamond to selectively initialize, control and read out carbon-13 spins in the surrounding spin bath and construct high-fidelity single- and two-qubit gates. We exploit these new capabilities to implement a three-qubit quantum-error-correction protocol and demonstrate the robustness of the encoded state against applied errors. These results transform weakly coupled nuclear spins from a source of decoherence into a reliable resource, paving the way towards extended quantum networks and surface-code quantum computing based on multi-qubit nodes.