Sparking from an electrical cord is potentially dangerous, raising the risk of house fires and electrocution. If you see sparks coming from an electrical cord, address the issue immediately and carefully.
Pull the Plug
If you see sparks coming from the outlet or the cord itself, the first and most important step for is to immediately go to the circuit breaker box and shut down the power to the problem area. Then, unplug the cord.
Next, visually examine for scorching or burn marks on the outlet. If so, you may need to have an electrician look at it. Then, examine the end of the plug to make sure the prongs are intact and not bent or loose. If the electrical cord is attached to a metal appliance or object, make sure there are three prongs, including the important grounding prong.
Fix or Replace the Plug
The best suggestion is to simply to replace the cord or appliance. This eliminates the worry of fire, etc,. because the new plug will be free of wear and tear. Replacing an appliance could be costly, but fortunately there are other ways to fix the cord.
Examine the cord for open areas that expose the inner wires; this most likely is causing the sparking. These wires lack protective insulation that keeps the electrical charge inside the cord. Purchase electrical tape at a hardware store and wrap the tape securely around the exposed area. This should eliminate the sparking, but the tape should be examined regularly to make sure it's holding. The Occupational Safety and Health Administration says that repairing minor nicks and cuts in an extension cord is acceptable using duct tape, but the State of Texas Office of Risk Management says electrical tape can melt because of the heat created by the wires.
If you have children, the best idea is to simply replace the cord and eliminate the risk. If the grounding prong is missing, do not try to replace it, just replace the cord. Unless the knick in the cord is very small, it's best to simply replace the cord entirely. That can be done by a certified electrician or appliance repairman or by taking an appliance under warranty back to where you bought it.