I just purchased a shed and would like to run a few things (light, fan, etc.) inside. The shed is not wired for power, so I was going to just run an extension cord to the shed. Rather than drill a hole in the shed for the cord or run it through the window, is there an electrical box that has plugs on BOTH sides so I can plug the extension cord in on the outside, and plug the power strip in on the inside (yes I get I am still having to drill a hole, but it wouldn't be a hole with an extension cord running through it). Basically the box would act as an mini extension cord to transfer power from one plug to another. Is there such a thing?

  • 12
    In most locales, that would be a serious code violation for a number of reasons (shock, fire hazard, etc.). A one-time temporary use, e.g., while using power tools, might be acceptable -- but then you could just run the cord through a window. Commented Apr 30 at 18:55
  • 2
    Will the cord be permanently powering the shed? Lying on the ground, string between trees? Or you reel it out when needed but even then don't want to use the window?
    – jay613
    Commented May 1 at 11:56
  • 5
    @DrMoishePippik is correct, this is a code violation in most parts of the civilized world if it’s intended to be permanent or semi-permanent. Even if it isn’t a violation where you live though, it’s a nontrivial hazard. Think of what happens when somebody runs over the cord with a lawnmower, or when the tree that happens to be supporting it falls over, or any number of other entirely possible scenarios. I get that it’s expensive to get this done right by laying conduit, but I can almost guarantee you that the cost is worth the safety of having it done right. Commented May 1 at 17:26
  • 3
    Is the shed permanent? Other than cost, is there a reason you can't wire it properly as an outbuilding on its own breaker ?
    – Criggie
    Commented May 1 at 21:50
  • 1
    Does your shed have a door? Voila! You can safely run the extension cord through the door. No hole to drill. No hole to allow water to leak in & ruin stuff. No worry about making suicide cords or finding inlets.
    – FreeMan
    Commented May 2 at 17:41

4 Answers 4


The right way...

is to dig a trench and run a permanent circuit out there. Only 6" cover for RMC metal conduit, or with GFCI protection at the house, 12" cover using UF cable.

However I gather trenching is an option you've excluded, so on to your question about an inlet and simply running power out there temporarily or powering the shed off a generator or Jackery.

There's a trick

Plugs have prongy things, sockets have slotty things. The system is designed so power sources, which are energized, are never prongy and always slotty. And then conversely, loads which take power (like your toaster), which are dead when not plugged in, are always prongy since they can't hurt you. You teach your child not to stick paper clips in there, now imagine if every household receptacle looked like this?

enter image description here

That would be bad! It would be ridiculously easy to get shocked.

Well, it would be the same story if some nitwit made an extension cord with the prongy things on both ends, known as a "suicide cord". With one end plugged into supply, the other end is now lethal. And it's been tried to death - people are not perfect enough to handle that without frequent bad endings. Not least, someone could trip on the cord and yank out the zappy end.

Meet the inlet

So what happens when a building is the load, that is taking power? We don't think about it with utility power because that is hardwired. But what about an emergency generator hookup (if properly done)? An RV?

Since the building is the load, it needs to have the prongy thing for the above reasons. So when it works like a socket (being attached to a structure and all), but needs to be a load, that's called an inlet.

You've already met; it's that thing in the photo above.

You put that on the shed or RV or food trailer or whatever is inputting power. That easy.

From the inlet you wire to one or more outlets or hardwired loads, even a subpanel if that's appropriate.

The only issue you really get into is packaging, the pictured one is designed to be built into an RV, so you need to find one that you can put in a junction box or that includes its own junction box.

  • 21
    "...prongy, which can't hurt you" - I see you've never trodden on a UK Type G plug that someone left lying around...
    – avid
    Commented May 1 at 7:52
  • Leviton 001-05278-CWP fits in an outdoor junction box and will meet your need. (Not an endorsement but I have used it successfully) Commented May 1 at 12:42
  • 3
    It's probably fair to assume the OP is somewhere where mains connectors look like this, but the European (including UK) equivalent would look like this and be rain-proof when connected or this and also keep the water out when not in use. The other end of the cable would look normal
    – Chris H
    Commented May 1 at 13:22
  • 3
    As a brit, if I wanted to fit an inlet on a wall I'd be looking at something like cpc.farnell.com/PE1663SMB which comes with a box and is angled to point downwards (helping to keep the water out when not in use). Commented May 1 at 16:30
  • 2
    Again, one could make this workaround, but it is asking for serious trouble. There are many sites that explain how to wire a shed safely, e.g. extremehowto.com/wiring-a-garden-shed, familyhandyman.com/project/…, instructables.com/How-to-wire-a-shed-for-electricity, atimprovements.com/how-to-run-electricity-to-a-shed . The wrong shortcut could cause great grief. Commented May 1 at 17:42

Look up "inlet extension cord". It's an inlet that screws to the side of a shed and has an outlet attached to the back. No electrical installation, it's one piece exactly what you want. You can screw a power bar to the wall inside next to it.

Assuming the shed isn't double walled and that you will be dragging out the extension cord only when in use, and putting it away otherwise, I think this cheap simple approach is best.

If the shed has hollow walls or you will be leaving it permanently powered you should do it right as suggested by Moishe in a comment to Harper's post. Trench etc, full compliance with building regs.

Come to think of it, if you are only using the extension cord when you're in the shed, you could instead of the inlet use a desktop cable gasket. Effectively a 2 inch round window with a plastic cover.


Since the shed isn't moving anywhere, having an RV-style inlet as in Harper's answer doesn't really gain you anything. All it really gets you is the ability to de-wire the shed, ie the shed now looks like an appliance with a cord that detaches, like the socket on the back of your PC. As you're not going to pick up the shed and take it away, de-wiring the outside doesn't help very much.

Instead, you could wire the shed like its own extension cord. Mount a single receptacle inside the shed, connect it to cable that runs out of the shed, with a regular plug on it that plugs into a wall outlet. You'd have to drill a hole for the cord but not pass any plugs through it. This could work around code restrictions in some places that cover hardwired installations but not ones with a plug on the end.

However that's a hack, and if you're going to keep the shed for a long time it would be better to put in a proper hardwired supply, perhaps with its own breaker at the supply end. That's more or less the same work as above, although may require an electrician depending on local code, but you get proper circuit protection in case of overloads - and increases the scope of what you can run from the shed.

  • 5
    I believe there is a problem with this answer's idea: "connect it to cable that runs out of the shed" Typical extension cord cable can't run through walls in a house. Does this apply in a shed? Who wants to run the risk of the insurance company saying 'Yes it does'? Other forms of cable require conduit to pass out of the building or other such. OP said "Rather than drill a hole in the shed for the cord or run it through the window". Jay613's pre-built inlet extension cord or Harper's inlet & standard electrical work boxes are code- and insurance-compliant. Commented May 1 at 17:33
  • 4
    This has all of the problems of an inlet with none of the advantages.
    – Questor
    Commented May 1 at 19:48
  • @Triplefault The OP has not indicated where in the world they are, so we have no idea what code or insurance is relevant to their locale, nor do we know what forms of inlets or electrical boxes are in use. In my locale code only refers to fixed installations, so a 'removable' installation like this legal. Not a good idea, but legal. Commented May 1 at 21:26
  • Detachable cords are needed for reasons other than mobility. For example, changing the length of the cord, or replacing a damaged cord, are unnecessarily difficult with a captive cable. Use the inlet.
    – Ben Voigt
    Commented May 2 at 16:00
  • @Triplefault install a (weatherproof) socket on the outside wall of the house. Get an electrician to do this if the applicable wiring code requires it. Plug the shed extension into it as and when needed. I would put a switch on the inside of the house so it's not live except when needed. You can also run your mower off it.
    – nigel222
    Commented May 2 at 16:56

I've been there (shed, not wired) and did it differently.

First, you want to dig your cable, ideally below the frost line, at least deep enough that nobody will hit it by accident with a shovel or stick that they decide to push into the yard for whatever reason. I digged mine about a foot deep and haven't had issues. Also, just for extra proctection I ran it through one of those cable tubes.

Now your cable is in the ground, which means you can come up inside the shed, without making an ugly hole in the wall.

And for safety, as others have pointed out, I did it the other way around: Inside the shed, the power line has a fixed connection inside the junction box. The end that connects to the house has a regular end that plugs into the outside power socket.

All of those (cable, junction box, etc.) you can get outdoor-rated (IPS or whatever your location uses).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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