Swarm intelligence is a branch which deals in research that models the population of interacting agents or swarms that are self-organizing in nature. Grasshopper optimization algorithm is a modern algorithm for optimization which is inspired from the swarm-based nature. This algorithm simulates the behaviour of the grasshopper in nature and models that mathematically for solving optimization problems. Grasshopper optimization algorithm is used for the optimization of mechanical components and systems. Snubber spring is a kind of helical spring which is a part of suspension system in railway bogie. In this work, the design of snubber spring is optimized by using grasshopper optimization algorithm. The suspension system of railway bogie consists of inner spring, outer spring, and snubber spring. Optimization is done for the weight minimization of snubber spring. Wire diameter, number of active turns and mean coil diameter are the design parameters for the optimization. These parameters are optimized by using grasshopper optimization algorithm according to bounds, loading, and boundary conditions. The optimized parameters are validated experimentally and also by using a software. The spring is modelled in CATIA V5 and analyzed in ANSYS 17.0. The comparison of results is done and is validated with results experimentally in which the spring is tested on universal testing machine for compression test. © Springer Nature Singapore Pte Ltd 2020.