Lightning strikes and other sources cause high voltage surges in mains power. Safety capacitors protect humans and devices from high voltage surges by shunting the surge energy to ground.
In particular, safety regulations mandate a particular arrangement of Class X and Class Y mains filtering capacitors.
In principle, any dielectric could be used to build Class X and Class Y capacitors; perhaps by including an internal fuse to improve safety. In practice, capacitors that meet Class X and Class Y specifications are typically ceramic RFI/EMI suppression capacitors or plastic film RFI/EMI suppression capacitors.
Electromagnetic Interference (EMI) or Radio Frequency Interference (RFI) suppression film capacitors, also known as “AC line filter safety capacitors” or “Safety capacitors”, are used as crucial components to reduce or suppress electrical noise caused by the operation of electrical or electronic equipment, while also limited providing protection against electrical shocks.
A suppression capacitor is an effective interference reduction component because its electrical impedance decreases with increasing frequency, so that at higher frequencies they short circuit electrical noise and transients between the lines, or to ground. They therefore prevent equipment and machinery (including motors, inverters, and electronic ballasts, as well as solid-state relay snubbers and spark quenchers) from sending and receiving electromagnetic and radio frequency interference as well as transients in across-the-line (X capacitors) and line-to-ground (Y capacitors) connections. X capacitors effectively absorb symmetrical, balanced, or differential interference. On the other hand, Y capacitors are connected in a line bypass between a line phase and a point of zero potential, to absorb asymmetrical, unbalanced, or common-mode interference.
The whole blog and more information can be found on the website.