The adoption of Proton Exchange Membrane (PEM) fuel cells (FCs) is of great significance in diverse industries, as they provide high efficiency and environmental advantages, enabling the transition to sustainable and clean energy solutions. This study aims to enhance the output power of PEM-FCs by employing the Adaptive Neuro-Fuzzy Inference System (ANFIS) and modern optimization algorithms. Initially, an ANFIS model is developed based on empirical data to simulate the output power density of the PEM-FC, considering factors such as pressure, relative humidity, and membrane compression. The Salp swarm algorithm (SSA) is subsequently utilized to determine the optimal values of the input control parameters. The three input control parameters of the PEM-FC are treated as decision variables during the optimization process, with the objective to maximize the output power density. During the modeling phase, the training and testing data exhibit root mean square error (RMSE) values of 0.0003 and 24.5, respectively. The coefficient of determination values for training and testing are 1.0 and 0.9598, respectively, indicating the successfulness of the modeling process. The reliability of SSA is further validated by comparing its outcomes with those obtained from particle swarm optimization (PSO), evolutionary optimization (EO), and grey wolf optimizer (GWO). Among these methods, SSA achieves the highest average power density of 716.63 mW/cm2, followed by GWO at 709.95 mW/cm2. The lowest average power density of 695.27 mW/cm2 is obtained using PSO.