Do not plug a space heater into an extension cord.
No. At least, not as a long-term solution. And if you absolutely have to, you need to follow very specific rules.
The problem: space heaters pull a lot of current—usually 12-15 amps on a 1500-watt unit. Most extension cords are not built for that sustained draw. They overheat, melt, and start fires. The cord itself becomes a heater, which defeats the whole point.
If you must use one (temporary, supervised, no other choice), get a 14-gauge or thicker (lower gauge number) cord that’s as short as possible. Check the cord temperature regularly—if it’s warm to the touch, stop using it immediately. Never plug the heater into a power strip, surge protector, or multi-tap. And never, ever run the cord under a rug or through a door.
But the real answer is: plug the space heater directly into a wall outlet. Move the heater closer to the outlet, not the outlet closer to the heater.
Your house is worth more than the convenience of an extra three feet.