The design of mechanisms for the static balancing of a rotating and weight-varying link has tremendous implications for mechanical structures and robotic systems. This article presents a compact gear-spring mechanism (CGSM) for the static balancing of variable payloads. The CGSM is constructed with a three-gear train and a tension spring mounted on a rotating link with a mass to be statically balanced. The static balancing design of the CGSM is realized by imposing geometrical constraints on the links and then deriving the spring parameters from analytical equations. The payload variability of the CGSM is obtained through an energy-free adjustment of the settling position of the spring when the rotating link is vertical. A theoretical model and experimental tests are provided to demonstrate the performance of the CGSM. Experimental studies showed that the CGSM could be maintained over a prescribed workspace without input forces. The actuator torque and accumulated energy consumption of the CGSM were practically decreased by up to 89.4% and 95.7%, respectively, within a range of payloads from 0.2 kg to 0.8 kg.