Whole-brain simulation stands as one of the most ambitious endeavors of our time, yet it remains constrained by significant technical challenges. A critical obstacle in this pursuit is the absence of a scalable online learning framework capable of supporting the efficient training of complex, diverse, and large-scale spiking neural networks (SNNs). To address this limitation, we introduceBrainScale, a framework specifically designed to enable scalable online learning in SNNs.BrainScaleachieves three key advancements for scalability. (1) Model diversity:BrainScaleaccommodates the complex dynamics of brain function by supporting a wide spectrum of SNNs through a streamlined abstraction of synaptic interactions. (2) Efficient scaling: Leveraging SNN intrinsic characteristics,BrainScaleachieves an online learning algorithm with linear memory complexity. (3) User-friendly programming:BrainScaleprovides a programming environment that automates the derivation and execution of online learning computations for any user-defined models. Our comprehensive evaluations demonstrateBrainScale’s efficiency and robustness, showing a hundred-fold improvement in memory utilization and several-fold acceleration in training speed while maintaining performance on long-term dependency tasks and neuromorphic datasets. These results suggest thatBrainScalerepresents a crucial step towards brain-scale SNN training and whole-brain simulation.