You want to run power to a garden shed, power an outdoor fountain, light up a pathway, or reach an outbuilding across the yard. The simplest-looking solution is to bury an extension cord. It is already there, it is long enough, and you have seen people do it. But whether this is safe, whether it will actually work long-term, and whether it is legal are three separate questions with three separate answers — and understanding them before you dig saves you from a potentially serious electrical hazard.

This guide covers everything: whether you can bury a standard extension cord, why it is dangerous to do so, what the correct products are for underground electrical runs, how to bury them safely and legally, how deep to dig, what conduit to use and when, how to get power to a shed or outbuilding properly, and how to handle specific situations like crossing a driveway or going under a concrete path. If you need to run power underground, this guide gives you the information to do it correctly the first time.

Do Not Bury a Standard Extension Cord

Standard extension cords are not rated for direct burial. Buried without proper protection, they become an electrocution and fire hazard within months to years as moisture, soil movement, and insulation degradation damage the cord. Use the correct products described in this guide instead.

Quick Reference: Underground Electrical Runs

Can you bury a standard extension cord?No — not rated for burial, becomes a hazard
Correct product (simplest)UF-B direct-burial cable — no conduit needed at 24 inches depth
Correct product (most protection)THWN wire in rigid PVC or metal conduit
Minimum burial depth (no conduit)24 inches for UF-B cable
Minimum burial depth (in conduit)6 inches for rigid metal conduit; 18 inches for PVC conduit
Permit required?Usually yes for any new circuit — check local requirements

Can You Bury an Extension Cord Underground?

No. Standard extension cords cannot be safely buried underground, and doing so creates genuine electrical hazards that worsen over time. This is not a technicality or excessive caution — it reflects the fundamental difference between what extension cords are designed for and what underground burial requires.

Extension cords are designed for temporary, above-ground, dry-location use. Their insulation is thermoplastic — a type of plastic that is flexible and durable in dry indoor and covered outdoor conditions but is not designed to withstand the combination of soil moisture, compressive stress from earth above it, freeze-thaw cycling in cold climates, and UV degradation if any portion is exposed. In underground burial conditions, the insulation of a standard extension cord begins to degrade within months to a few years depending on soil conditions, moisture levels, and temperature cycling.

As the insulation degrades, the conductor becomes exposed to moist soil — which is electrically conductive. This creates a ground fault: current flows from the conductor through the soil rather than through the intended circuit. Ground faults in buried cables are an electrocution hazard for anyone digging nearby and can cause fires if the fault current is high enough to overheat the surrounding soil and any organic material in it. They also trip GFCI breakers repeatedly without a clear source, making the circuit unreliable.

Beyond the hazard, buried extension cords violate the National Electrical Code (NEC) and local electrical codes in every US jurisdiction. If a buried extension cord causes a fire or injury and your home insurer discovers it, the liability consequences extend beyond the electrical repair itself.

Extension cords underground
Why Standard Extension Cords Cannot Be Buried and What to Use Instead

The Right Products for Underground Electrical Runs

The NEC specifies which cable and wire types are approved for underground use. There are two primary options for residential underground runs, each with different installation requirements and appropriate applications.

UF-B Cable (Underground Feeder Cable)

UF-B (Underground Feeder, B-rated) cable is the residential standard for direct-burial electrical runs. Unlike standard house wire (NM-B cable, known as Romex), UF-B cable has a solid thermoplastic jacket that encases all conductors together in a solid plastic mass — rather than individual insulated wires inside a plastic sheathing. This solid encapsulation makes it moisture-resistant and suitable for direct contact with soil.

UF-B cable can be buried directly in the ground without conduit at a minimum depth of 24 inches below the finished grade. It runs from the main panel (or a sub-panel) through the soil to the destination — a shed, outbuilding, landscape lighting junction box, or outdoor receptacle. It must be protected with conduit where it enters the ground at the source end and where it emerges at the destination, typically for the exposed vertical runs on the exterior wall above ground.

UF-B cable is widely available at hardware stores in common sizes — 12/2 and 10/2 being the most used for shed and outbuilding circuits. The cost is higher than standard NM-B cable but lower than conduit runs when factoring in labor for conduit installation.

THWN Wire in Conduit

THWN (Thermoplastic Heat- and Water-resistant Nylon-coated) wire run through rigid PVC or rigid metal conduit is the alternative approach that provides the highest level of protection and the most flexibility for future upgrades. Individual THWN conductors are waterproof and suitable for use in conduit that may have water intrusion.

The advantage of conduit over direct-burial UF-B is future accessibility. If you ever need to upgrade the circuit size, add conductors, or repair a section, wires in conduit can be pulled out and replaced without digging. With direct-burial UF-B, any repair or upgrade requires digging up the entire run.

Rigid PVC conduit requires a minimum burial depth of 18 inches. Rigid metal conduit (RMC or IMC) requires only 6 inches of burial depth — the metal itself provides significant physical protection. For runs under driveways, rigid metal conduit at 6 inches depth is often preferable to PVC at 18 inches because it is easier to install at shallow depth under an existing hard surface.

MethodMin. DepthProsBest For
UF-B direct burial24 inchesSimpler install, lower material costNew runs in open ground
THWN in PVC conduit18 inchesUpgradeable, best long-term optionAny permanent run
THWN in rigid metal conduit6 inchesShallowest burial, best protectionUnder driveways, shallow areas
Standard extension cordN/ANoneNot permitted underground

How Deep to Bury Underground Electrical Cable

The NEC Table 300.5 specifies minimum burial depths for different cable and conduit types in different applications. The depths are minimums — you can always go deeper, which provides additional protection against frost heave, accidental digging, and settling. The depths most relevant to residential projects are as follows.

UF-B cable direct burial in general areas (lawn, garden): 24 inches minimum. This depth keeps the cable below most routine garden digging and provides protection against frost in most US climates.

UF-B cable under driveways and roads: 24 inches minimum (same as general areas). However, direct burial cable under driveways is not ideal because the compressive loads from vehicles can damage the cable over time at shallower depths. Using rigid metal conduit at 6 inches depth under driveways is a more reliable approach and easier to install under an existing hard surface.

PVC conduit with THWN wire: 18 inches minimum in general areas. Under driveways: 18 inches (same).

Rigid metal conduit (RMC or IMC) with THWN wire: 6 inches minimum in all locations. The metal conduit provides physical protection that justifies the much shallower burial depth.

GFCI-protected circuits with certain configurations: 12 inches is sometimes permitted for GFCI-protected 120V circuits with certain cable types — check your local code and the specific NEC table for the applicable conditions.

Extension cords
Correct Burial Depths and Installation Methods for Underground Electrical Runs

Step-by-Step: Running Underground Power to a Shed or Outbuilding

Running a new circuit from the main panel to a shed or outbuilding is one of the most common residential underground electrical projects. Here is the complete process using UF-B direct-burial cable, the most straightforward approach for most homeowners.

Underground Power Run: Complete Process

  1. 1

    Call 811 before you dig. In the US, 811 is the national “Call Before You Dig” service. Utility companies mark the location of underground gas lines, electric cables, water mains, and communication lines at no charge. This is a legal requirement in most states and a practical safety essential — you do not want to hit a buried gas line. Allow three business days for marking. If you see utility flags in your yard from a previous call, our guide on navigating utility flags explains what each color means.

  2. 2

    Obtain a permit. Most jurisdictions require an electrical permit for any new circuit, including underground runs. This is not optional — work done without a permit can void your homeowner’s insurance for related claims, create problems when selling the home, and result in fines. The permit process also triggers an inspection that confirms the work was done safely.

  3. 3

    Plan the route and calculate wire size. The total distance of the run determines what wire gauge you need — voltage drop increases with distance and must be kept within acceptable limits. For runs up to 100 feet, 12-gauge wire is typically adequate for a 20-amp circuit. For runs of 100-200 feet, use 10-gauge wire. For longer runs, consult a voltage drop calculator or licensed electrician.

  4. 4

    Dig the trench. Dig to at least 24 inches depth for UF-B cable (or the applicable depth for your chosen method). A rented electric trencher makes this significantly faster than hand digging for runs longer than twenty feet. Keep the trench at least two feet from any marked utility.

  5. 5

    Install conduit at transition points. UF-B cable in the trench does not need conduit, but it needs protection where it transitions from underground to above-ground at both ends. Use a short section of rigid conduit (typically PVC) extending from where the cable exits the ground up to where it enters the structure. This protects the cable from physical damage at these exposed transition points.

  6. 6

    Lay the cable and install warning tape. Lay the UF-B cable in the bottom of the trench. Optionally place a layer of sand beneath the cable to cushion it. Place a strip of bright orange underground warning tape approximately 12 inches above the cable — this alerts anyone digging in the future that there is a buried electrical line below.

  7. 7

    Connect to the panel and destination. This step requires electrical knowledge. The circuit breaker at the main panel, the cable connections, and the receptacles or sub-panel at the destination must all be properly wired. If you are not confident in electrical work, hire a licensed electrician for the panel connection at minimum — this is the highest-risk portion of the project.

  8. 8

    Schedule the inspection and then backfill. Do not backfill the trench until the inspector has seen the installation. Once it passes inspection, backfill in layers and compact lightly to prevent future settling that could expose the cable.

Special Situations: Crossing Driveways and Existing Hard Surfaces

Running underground electrical cable under an existing driveway, patio, or concrete path without breaking the surface requires a technique called boring or directional drilling. A steel pipe slightly larger than the conduit you intend to install is driven horizontally through the soil under the hard surface using a large hammer and a pipe drive assembly. Once the pilot hole is through, the conduit is pulled back through it.

For drives and paths up to about twelve feet wide, this can be done with basic rented tools or by hand with a drive cap and sledgehammer. For longer spans or where the soil is particularly hard or rocky, rented horizontal boring equipment or a contractor is more practical.

Under driveways, use rigid metal conduit rather than PVC if possible, because metal conduit resists the compressive loads from vehicles much better than PVC at shallow depths. Even at 6-inch depth, rigid metal conduit under a residential driveway handles the load of normal vehicle traffic without deformation.

Extension interior
Interior Connections and Panel Considerations for Underground Circuits

GFCI Protection for Underground Circuits

The NEC requires GFCI (Ground Fault Circuit Interrupter) protection for all outdoor receptacles and circuits, and for underground circuits that supply outdoor outlets. GFCI protection can be provided either at the circuit breaker (a GFCI breaker in the main panel) or at the first receptacle in the circuit using a GFCI outlet that protects all downstream outlets on the same circuit.

A GFCI breaker is the cleaner solution for an underground circuit to a shed or outbuilding. It protects the entire circuit including the buried cable run, meaning that any ground fault in the underground cable itself — not just at the receptacles — will trip the GFCI protection. This is important because a developing insulation failure in a buried cable is exactly the type of fault that GFCI protection is designed to detect and interrupt.

Installing a GFCI breaker in the main panel is straightforward if you are comfortable with panel work, but the panel interior carries lethal voltage even when the main breaker is off (the service entrance wires remain energized). If you are not experienced with electrical panel work, have a licensed electrician install the GFCI breaker.

Can You Use an Extension Cord Temporarily While the Permanent Run Is Being Installed?

An outdoor-rated extension cord (marked W or W-A on the cord jacket — indicating weatherproof insulation) can be run above ground temporarily while you complete a permanent underground installation. It must not be buried, covered with soil, or left under mulch even temporarily. It should be rated for outdoor use, should be a continuous run without joins or splices, and should not be driven over by vehicles.

Temporary outdoor extension cord use should be just that — temporary. The NEC and most fire codes prohibit using extension cords as permanent wiring. An outdoor-rated extension cord left in place for months becomes a permanent installation in practice if not in intention, and creates the same degradation and hazard risks as a buried cord, simply more slowly.

Safety tips for underground extension cords
Safety Considerations for Any Underground or Outdoor Electrical Installation

Permits and Inspections: What You Need to Know

Most homeowners are unaware that installing a new electrical circuit — including an underground run to a shed or new outdoor receptacle — requires a permit in virtually every US jurisdiction. This requirement exists because electrical work is one of the leading causes of residential fires, and the inspection process catches common mistakes before they become hazards.

Skipping the permit and inspection creates three specific problems. First, the work will not be documented and may be flagged during a home sale as unpermitted work, which can complicate the transaction and require retroactive permitting at the buyer’s insistence. Second, if the unpermitted wiring is involved in a fire or electrical incident, your homeowner’s insurance may deny the claim on the grounds that the work was not code-compliant. Third, the inspection serves as a check on your work — an inspector catching a wiring error before burial is far preferable to discovering it through a tripped breaker, damaged equipment, or a fire.

The permit process for a residential underground circuit is typically straightforward. You describe the project to your local building department, pay a modest fee (usually $50-150), receive the permit, do the work, and call for an inspection. Most inspectors are used to residential electrical projects and are not looking to create problems — they want to confirm that the installation is safe.

Frequently Asked Questions

Can you bury a regular extension cord underground?

No. Standard extension cords are not rated for direct burial and become a serious electrical hazard when buried. Moisture infiltration through degraded insulation causes ground faults that create electrocution and fire risks. The correct products for underground runs are UF-B direct-burial cable or THWN wire in approved conduit.

How deep does an underground extension cord (or cable) need to be buried?

UF-B direct-burial cable requires a minimum of 24 inches. PVC conduit requires 18 inches. Rigid metal conduit requires 6 inches. These are NEC minimums — going deeper is always acceptable and provides additional protection. Under driveways with vehicle traffic, rigid metal conduit at 6 inches depth or PVC conduit at 18 inches provides adequate protection for residential vehicle loads.

Is it safe to bury an outdoor extension cord in conduit?

No — even in conduit, a standard extension cord is not rated for this use. Extension cords have connection points (plugs and receptacles) at their ends that are not designed for permanent underground installations and will allow moisture infiltration. The correct approach is to use THWN wire pulled through the conduit — bare wire designed for conduit installation — not an extension cord inside a pipe.

Do I need a permit to run underground power to a shed?

In virtually all US jurisdictions, yes. Any new electrical circuit requires a permit and inspection. The permit process involves describing the project to your local building department, paying a fee, completing the work, and scheduling an inspection before backfilling the trench. Work done without a permit can complicate home sales and may affect insurance coverage for related incidents.

What wire size do I need for an underground run to a shed?

For runs up to 100 feet, 12-gauge wire on a 20-amp circuit handles most shed needs including tools, lighting, and small appliances. For runs of 100-200 feet, use 10-gauge wire to keep voltage drop within acceptable limits. For runs longer than 200 feet or for heavy loads like large electric heaters, table saws, or air compressors, use a voltage drop calculator or consult an electrician to determine the appropriate wire gauge.

Can I put an extension cord in PVC pipe underground?

No. An extension cord in conduit is still an extension cord — not rated for permanent installation or underground use regardless of how it is protected. The correct approach is to use individual THWN conductors pulled through the conduit. THWN wire is designed for conduit installation and is rated for wet locations including conduit that may have water intrusion.

What do I need to call before I dig for an underground cable?

Call 811 — the national “Call Before You Dig” number in the United States. Utilities will come out and mark the location of underground gas lines, electric cables, water mains, and other buried services at no charge. This is a legal requirement in most states and a critical safety step. Allow three business days for utilities to respond before digging. Do not dig within two feet of any marked utility.


Running underground power correctly the first time prevents the cost and hazard of fixing it later. For more practical home safety and DIY guides, browse our DIY Projects section and our Home Safety guides.

Interior Home DIY

Written by

Interior Home DIY

DIY & Interior Design Editor

Interior Home DIY is a team of home improvement enthusiasts, contractors, and interior designers with over 10 years of combined experience. We share practical DIY tutorials, interior design ideas, home safety tips, and budget-friendly renovation guides to help homeowners transform their living spaces confidently.