Mac & KYSIGN are correct, The best protection would be a UPS as you are Isolating the A/C circuit. In a UPS the AC voltage is charging a bank of batteries which are DC, The batteries are then isolated from the A/C voltage, it produces the AC voltage from DC through a rectifier circuit that is the safest most economical way to protect your equipment.
I worked 20 years at my County as Jail Maintenance Supervisor. It's pretty important that those 400 plus inmates of my County's finest, stay locked up in their cells. We had over 250 cameras, 32 DVR's, Racks and racks of PLC's that control door locks and all kinds of communications equipment that needed protection. We had a Cummings Generator that would supply backup for more than 6,000 amps of current. For that moment until the generator was up to speed the emergency panels (electronics and vital equipment including electronics) were backed up by a huge UPS with a bank of 24 12 volt commercial batteries. Over those 20 years we took some major hits and never once did we loose our electronics. Nothing is 100% but a UPS is the closest your going to get. I am putting my small shop together now, and I am thinking a few searches On the internet today for a UPS may be in order not for the back up capability but for the surge protection.