Yes, 99.5% of tap water in Spain is considered fit for consumption and meets all the quality standards set by the European Union.
However, this has not always been the case, which is why in recent decades many Spaniards have switched from drinking tap water to bottled water. Over the years, many myths have been generated about tap water and the possible health problems it can cause. Few, if any, of these myths are true today. Basically, the strict controls and monitoring systems that tap water is subject to mean that unless there is a public warning from the municipal water company, the water is safe to drink. And if you don't like the taste of your tap water, buy a quality water filter like EcoPro, and you will save money, effort and plastic waste.
You can check the quality of the water in your area by clicking here.