Can I use a junction box to repair an extension cord?

No. That’s a bad idea and probably against electrical code. Extension cords are for temporary use, not permanent splices inside junction boxes. Cutting out a damaged section and adding a box turns it into a fixed installation, which the cord wasn’t designed for, and it can create a fire or shock hazard. Just replace the whole cord—extension cords aren’t expensive, and a repair like this isn’t safe long-term.

Explore

Explore

Explore