© The Author(s) 2022.Solenoid actuators are well-known components that convert electromagnetic energy into mechanical energy. For control purposes, it is requested to have a high magnetic force that stays almost constant in the working region of the actuator. To meet these requirements, it is necessary to have an optimal geometrical design of the actuator. In this study, the following steps are performed to optimize the geometry of the solenoid actuator. The Finite Element Analysis (FEA) is performed, and the results of the simulation is verified with the experimental data. The effect of all geometrical parameters on the characteristics of the magnetic force is investigated. The parameters that highly affect the magnetic force are chosen as design optimization parameters. Then, the Particle Swarm Optimization (PSO) algorithm is realized to find optimal parameters. The algorithm consists of two objective functions being combined into a single objective function. It includes a higher and more consistent magnetic force in the effective working region of the solenoid. Finally, the solenoid actuator with optimized parameters is manufactured, and the results are compared. They show that the optimized solenoid actuator satisfies one of the objective functions, and magnetic force stays almost constant in the working region of the solenoid actuator.