Abstract Passive magnetic gravity compensation may be a very feasible alternative to the more commonly used mechanical or pneumatic solutions for vibration isolation systems. This paper presents a study on the optimal design of an ironless magnetic spring, or gravity compensator, with a horizontal airgap and unequally sized magnet arrays. Its envisaged application is an electromagnetic vibration isolator that demands a high force level, combined with low spring stiffness, which yields a low resonance frequency. Two optimization methods are used to achieve these properties and their results are compared. This study aims to provide more insight in the limits of the proposed topology on the achievable vibration isolation performance of permanent-magnet based springs as well as the feasibility of the modeling and optimization tools. A gravity compensator has been realized in a test setup that shows the feasibility of the chosen modeling technique and of magnetic gravity compensation.