This paper introduces a novel approach to efficient localization in next-generation communication systems through a base station (BS)-enabled passive beamforming utilizing beyond diagonal reconfigurable intelligent surfaces (BD-RISs). Unlike conventional diagonal RISs (D-RISs), which suffer from limited beamforming capability, a BD-RIS provides enhanced control over both phase and amplitude, significantly improving localization accuracy. By conducting a comprehensive Cram\'er-Rao lower bound (CRLB) analysis across various system parameters in both near-field and far-field scenarios, we establish the BD-RIS structure as a competitive alternative to traditional active antenna arrays. Our results reveal that BD-RISs achieve near active antenna arrays performance in localization precision, overcoming the limitations of D-RISs and underscoring its potential for high-accuracy positioning in future communication networks. This work envisions the use of BD-RIS for enabling passive beamforming-based localization, setting the stage for more efficient and scalable localization strategies in sixth-generation networks and beyond.