In the present work, energy harvesting from sloshing of Newtonian and non-Newtonian fluids has been studied experimentally. The most important features of this study are: proposing a new method for energy harvesting, comparing the performance of Newtonian and non-Newtonian fluids in energy harvesting, determining the impact and contribution of each input parameter in the results and driving a relationship for the obtained data in terms of input parameters. Power law index of fluids, frequency of excitations, electrical resistance, strength of permanent magnets and non-dimensional fluid height in the container have been used as input parameters. Effect of input parameters on peak to peak voltage, root mean square voltage and electrical power have been investigated. Also, the effect of input parameters was statistically investigated using analysis of variance (ANOVA) and finally an empirical-mathematical model was developed for harvested voltages and electrical power. Results showed that strength of the permanent magnets and the frequency of excitations had higher influence on the output parameters with respect to the other input parameters. For example, the contribution percentage of B and f on the harvested electrical power were 28.63% and 22.67%, respectively. Obtained results also indicated that the harvested voltages and electrical power were higher for Newtonian fluid than dilatant and pseudoplastic liquids. Harvested electrical power was increased by increasing the strength of permanent magnet and decreasing electrical resistance. Another important finding is reaching the output parameters to their maximum level at near the resonance frequency of the system. Highest measured parameters were 650 mV, 94.96 mV and 41.52 m W for Vpp, Vrms and P, respectively.