Box fan cords are replaceable, but expect to cut and splice
Box fans usually don’t have a detachable power cord—that molded plug and wire runs straight into the motor housing. So you can’t just unplug and swap it like a lamp cord. But you can fix a frayed cord without buying a new fan.
If the fray is near the plug, just cut the cord a few inches above the damage, strip the wires, and attach a new replacement plug (the kind you screw onto the wires). Those are a few bucks at any hardware store. Make sure the prongs are polarized (one wider than the other) and match the wire colors.
If the fray is further up the cord or near the fan body, you have two options: splice in a new section with wire nuts and electrical tape, or open the fan housing and replace the whole cord. Opening the housing usually means removing a bunch of screws and maybe soldering. I’d only do that if you’re comfortable with basic electrical work.
Honestly, if the cord is damaged more than just at the plug, I’d just replace the fan. A new box fan costs $20–30. A fire from a bad splice costs a
