A constrained particle swarm optimization algorithm (C-PSO) is introduced and modified for hyperelastic and visco-hyperelastic characterization of bovine brain tissue at three different strain rates. Using the elasticity compatibility and Drucker’s stability criterion, the constraints of the hyperelastic and visco-hyperelastic models are identified and implemented in the C-PSO algorithm and its performance is compared with the classic curve fitting algorithms including Levenberg-Marquardt and trust region reflective. The accuracy of the C-PSO was found to be superior for visco-hyperelastic characterization, as for some strain rates, the trust region reflective algorithm failed to provide a reasonable approximation.