Solid-state spin qubits are a promising platform for quantum computation and quantum networks. Recent experiments have demonstrated high-quality control over multi-qubit systems, elementary quantum algorithms and non-fault-tolerant error correction. Large-scale systems will require using error-corrected logical qubits that are operated fault-tolerantly, so that reliable computation is possible despite noisy operations. Overcoming imperfections in this way remains a major outstanding challenge for quantum science. Here, we demonstrate fault-tolerant operations on a logical qubit using spin qubits in diamond. Our approach is based on the 5-qubit code with a recently discovered flag protocol that enables fault-tolerance using a total of seven qubits. We encode the logical qubit using a novel protocol based on repeated multi-qubit measurements and show that it outperforms non-fault-tolerant encoding schemes. We then fault-tolerantly manipulate the logical qubit through a complete set of single-qubit Clifford gates. Finally, we demonstrate flagged stabilizer measurements with real-time processing of the outcomes. Such measurements are a primitive for fault-tolerant quantum error correction. While future improvements in fidelity and the number of qubits will be required, our realization of fault-tolerant protocols on the logical-qubit level is a key step towards large-scale quantum information processing based on solid-state spins.