Is it safe clean electrical contacts while the power is on?

There is no way to give a definite answer for all circumstances, because safety is highly dependent on the amount voltage and amperage as well as environmental factors such as the equipment, working environment, etc. On the other hand, choosing a contact cleaner with high dielectric strength or breakdown (also called withstand) voltage increases safety when you do have to clean energized equipment. BEFORE you start spraying, we strongly recommend you shut down power to avoid the potential of sparks, electrical shorts or discharges, and other safety hazards. If, for whatever reason, you don’t have the option of disconnecting the power, look for electrical contact cleaners with a dielectric strength above 30 kV (30,000 volts). Choosing a nonflammable cleaner would also add a layer of safety in case there is a spark.