I found several other questions about this but most had answers about it being a code violation. I don't care about that, my house doesn't need to be up to code. It's an off-grid property and I need to run an extension cord through the wall so that I can run a generator outside and power things inside. It seems most logical to run it down into the crawlspace and then outside, but I don't want to bore a hole big enough for the end of the extension cord. I'm a bit hesitant to try cutting a power cord. Also someone said something about it being unsafe to run an extension cord in such a small hole. What would be a safe solution here? The generator is only 1250-watts so I won't be running anything more through it. I would appreciate some ideas.

I'm just looking for a cheap way to run electronics in my house off a generator without gassing myself out, causing leaks/drafts or starting a fire. Surely someone has a workable solution.

  • 2
    Are you looking for "safety that randoms on the Internet just made up"? Or are you looking for safety identified by science and statistics, and collected by experts into a well regarded book? But not Code... Mar 18, 2020 at 1:05
  • 2
    Doing this badly is your entry for a Darwin Award - understand and follow the advice given. Electricity kills and not always the one guilty of the mistake.
    – Solar Mike
    Mar 18, 2020 at 5:58
  • 1
    Please don't do this. There's good reasons these things are not up to code. It will take little extra effort or money to do this safely, and chances are it will be a lot more reliable.
    – GdD
    Mar 18, 2020 at 10:10
  • 2
    Don't expect us to help you violate the code aka do something illegal. The code is about SAFETY. Literally, it's there so you don't hurt or kill yourself. So follow it, even if you don't want to
    – Ack
    Mar 18, 2020 at 19:45

2 Answers 2


Since you're so keen on an anti-Code solution, Imma give you one.

We're gonna do exactly ThreePhaseEel's "isolated section of permanent wiring" which is Code correct. With a couple of modifications to cut corners the way you like, and we'll swerve out of our way to violate Code once or twice so you feel like we're saving money. I'll tell you when that happens.

Junction boxes -- $5 + $2/extra box. Put 'em anywhere you want - better to hardwire these boxes than drape extension cords. $1 junction box, I'd mount it within 1" of the floor to remove any issue of wire being unprotected, but at least 3/8" above the floor so the cover plates fit. If it'll be exposed to foot traffic, use a $1 metal Handy-box and metal cover plate. Many boxes have built in cable strain reliefs, if not get a 50 cent cable clamp will do. Insert a 50 cent receptacle and a 20 cent cover plate.

One more box. The perfect location is under the house, yet where the cord that'll be dangling from this box is wholly visible from outside. This is the transition box between house wiring and a flexible power cord that will plug into the generator. This gets a $1 steel Handy-Box with two cable clamps and a 30 cent blank box cover. (I know I'm kinda gold-plating this thing).

Cables -- scrounge or $10-ish. Now, connect all these junction boxes with cable, starting at the funny near-outside box. Just hop from box to box. Leave 7-8" of extra length inside each box. If you only have one box this is super easy.

You know what... I don't really care whether you use NM-B or UF-B.... #14 or #12... or /2 or /3 cable. The upside of NM-B /3 is it's round, so it fills a round hole easily with no air gap, don't use the red wire. I would scrounge/mooch these cables, everybody's got short lengths of NM or UF left over. Hit the Habitat for Humanity store. Whatevs. Don't use extension cord for this.

This is gonna get a 15A plug into a 13A generator so I'm comfortable with using 15A cable (#14). If you expected to plug it into a 20A generator, maybe #12 would worthwhile. Your call.

If you use UF-B, you could take that outside so you actually could fit an inlet for $20+. But I don't see you doing that.

The line cord - scrounge or $7. Now, scrounge around for any appliance cord or roached extension cord that is 14 AWG or larger, and has a good "plug end" for as long as you'll need to get from that Handy-box to a convenient place to either put the generator or an extension cord to the generator. Lop off the socket end if it has one.

Fit this line cord into the handy-box using the other cable clamp. About 7" into the box. This is where we violate Code. We're supposed to fit an inlet to the outside of the building. Draping a cord is naughty, but I'm not sure what we violated. Probably somewhere in 400.8 (allowed use of flexible cords) or 110.12 (pride of workmanship).

Hook it up (45 cents). Inside the near-outside handy-box, splice the 3 wires with wire-nuts (15 cents). You'll be joining solid to stranded wire but that is fine. Put the cover on it. On the receps, hook them up the normal way. Awright, we're done. Light it up.

That said, a generator is the expensive way to power a little bit of electronics. Try a 12V solar system: 2 used golf cart batteries + about 50W solar panel + a MorningStar SunGuard PWM controller, plus appropriate cigarette lighter USB adapters etc. While a great deal more than this, it'd be cheaper than this + fuel.

Man, just buying a gas can in this day and age, what the hey happened to the price of gas cans? And the stupid valves??? That right there makes me mad enough to go solar.

  • I hope I don't get snipped here for this comment, but I was LMAO reading your response. Very funny. Much appreciated hunkering down in western Washington State! Mar 18, 2020 at 16:17
  • Ha, yes, little regular sun in the PNW which is killer on the soul, but fortunately solar only loses 15-25% efficiency due to clouds, just need to install that much more panels to even out.
    – Ack
    Mar 18, 2020 at 19:50

Better solution: an isolated section of permanent wiring

There's a far better way to do this than bodging extension cords, and that's to use an isolated wiring segment to serve as a "bridge" to carry generator power across the wall. You'll need a 20A/120V generator inlet box (Reliance PBN21 or equivalent), some 12/2 UF cable, a suitable indoor box, appropriate cable clamps for the knockouts used, and a 5-15 duplex receptacle for this. The generator box gets mounted on an outside wall, near where your generator lives, and then is wired with the 12/2 UF run through the wall to the indoor box (which can go anywhere inside you wish, depending on how much wiring you're running). The receptacle then gets installed in the indoor box in the normal fashion.

Want more receptacles? Simply use suitable indoor wiring methods to branch off from the indoor box to more receptacle boxes, in exactly the same way one would extend a typical branch circuit. You may wish to use say, red receptacles to denote that these are generator-powered, by the way, in case utility mains service gets run to the place.

  • 1
    I appreciate your input, I'm really not sure I could implement this though. I'm not an electrician. Seems like this would be a $200+ solution as well. For my use case I would be better off running the extension cord through the window.
    – Mark
    Mar 18, 2020 at 4:02
  • 2
    @Mark -- this is really no harder than wiring up an outlet or two! Mar 18, 2020 at 11:41
  • 1
    @Mark And not hardly $200, as my answer explod^Hres. The $55-ish Reliance box is the vast majority of the budget, and it's a bulletproof code-solid solution to the outdoor inlet problem. (they make $15 inlets but they require janky outdoor in-use box covers to be legal). Mar 18, 2020 at 21:13
  • @Mark yeah, you should be able to do it for $100 at most ($50-$60 for the Reliance inlet box, $10 for the indoor box, receptacle, and cable clamps, and the remaining $30-$40 for UF -- that gets you 60'+ of 12/2 UF, which is way more than you'll need.) Mar 18, 2020 at 22:10
  • 1
    @SkyNT -- it's legal + safe, merely odd. A HI isn't an electrical specialist, so they're liable to tell you to get an electrician in to look at odd stuff, but any decent electrician should be able to figure out that there's nothing wrong with this from a Code perspective Aug 11, 2021 at 11:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.