NM-B vs UF-B Cable: Can You Run Romex Underground or in Conduit?

Why Romex (NM-B) Fails Underground Even Inside Conduit
This is probably the single most common DIY trenching mistake. Someone buys a leftover roll of yellow 12/2 NM-B Romex, slips it into Schedule 40 PVC pipe, glues every fitting tight, and figures the pipe keeps the cable dry.
Inspectors fail that every time for two clear code reasons. First, underground PVC conduit never stays bone dry—condensation builds inside it seasonally and groundwater eventually creeps in at fittings or ends. Because of that, NEC 300.5(B) explicitly defines the interior of any underground raceway or enclosure as a wet location. Second, NEC 334.12(B)(4) forbids Type NM-B cable in wet or damp locations. The paper separator wrapped inside Romex wicks moisture right up the jacket, rotting insulation and corroding conductors over time.
NM-B vs UF-B Side-by-Side

| Spec / Feature | Type NM-B (Indoor Romex) | Type UF-B (Underground Feeder) |
|---|---|---|
| Typical jacket colors | White (14 AWG), yellow (12 AWG), orange (10 AWG) | Solid gray PVC (sunlight resistant) |
| Conductor construction | Insulated wires + paper wrap inside loose outer sheath | Individual wires molded solidly into tough PVC jacket |
| Allowed locations | Dry indoor framing only (NEC 334.10 / 334.12) | Direct burial outdoors, wet/damp locations, and indoors |
| Sunlight & moisture rated | No | Yes (marked sunlight resistant) |
| NEC ampacity column | 60°C (NEC 334.80) | 60°C (NEC 340.80) |
| Ease of stripping & pulling | Very easy to strip and staple | Stiff, harder to strip, tough to pull through conduit |
Both cables share the exact same ampacity limits: 14 AWG at 15 amps, 12 AWG at 20 amps, and 10 AWG at 30 amps. Even though individual internal wires may use 90°C insulation, both NEC 334.80 and NEC 340.80 restrict NM-B and UF-B to the 60°C column of Table 310.16.
NEC Table 300.5(A) Underground Burial Depths

How deep you dig depends on whether you direct-bury UF-B or run conduit, and whether GFCI protects the buried cable at its source. Remember that NEC measures cover—the distance from the top of the buried cable or pipe up to finished grass or grade, not just the bottom of your trench.
| Wiring Method & Circuit Type | Typical Yard / Lawn Cover | Under 1- & 2-Family Dwelling Driveway | Under Min. 4 in. Exterior Concrete Slab (No Vehicles) |
|---|---|---|---|
| UF-B Direct Burial (General 120V/240V) | 24 inches | 18 inches | 18 inches |
| UF-B or Direct Burial (120V max, ≤20A, residential, GFCI at source) | 12 inches | 12 inches | 6 inches |
| PVC Conduit (Schedule 40/80 listed for burial) | 18 inches | 18 inches | 4 inches |
| Rigid Metal (RMC) or Intermediate Metal (IMC) | 6 inches | 18 inches | 4 inches |
Pay close attention to that 12-inch GFCI reduction in Column 4 of Table 300.5(A). It only applies if ALL of these are true: it's a residential branch circuit, 120 volts or less, protected at 20 amps or less, and GFCI protection sits upstream of the buried wire (either a GFCI breaker in the house panel or a GFCI receptacle inside the house feeding the underground run). A GFCI outlet out on the shed wall does not protect the buried cable getting there, so you'd still need 24 inches of cover. Also remember that a 240-volt run or any feeder to a subpanel never qualifies for the 12-inch rule.
Wherever UF-B comes up out of the dirt to enter an outdoor box or house siding, NEC 300.5(D) requires physical protection in a raceway (such as Schedule 80 PVC sleeve) from below grade up to at least 8 feet above finished grade, or to the point of entry.
UF-B Direct Burial vs THWN-2 in PVC Conduit
If you're digging a trench anyway, ask yourself whether pulling individual THWN-2 copper wires through 3/4-inch PVC conduit makes more sense than direct-burying flat gray UF-B. UF-B is legal inside conduit, yet pulling flat, stiff UF-B through 90-degree sweeps is miserable and forces you to upsize conduit substantially under oval-cable fill rules.
For a straight short run to a single yard post or garden receptacle, 12/2 UF-B direct-buried at 12 inches (with an upstream GFCI breaker) saves money and effort. For any long run to a detached garage subpanel, pool equipment, or future expansion, 18-inch-deep Schedule 40 PVC conduit with THWN-2 stranded conductors pulls smoothly, lets you use the 75°C ampacity column on 75°C terminals for larger feeders, and gives you a protected path if a wire ever needs replacing later.
Frequently Asked Questions
Can I run Romex (NM-B) inside PVC conduit outdoors?
No. NEC 334.12(B)(4) forbids NM-B in wet or damp locations, and outdoor or underground conduit is considered a wet location because condensation and water collect inside it.
How deep do I have to bury 12/2 UF-B wire?
Under NEC Table 300.5(A), general UF-B direct burial needs 24 inches of cover. However, a 120V residential branch circuit of 20 amps or less that is GFCI-protected before entering the ground only requires 12 inches of cover in a typical yard.
Can you use UF-B cable inside a house?
Yes. NEC Article 340 permits UF-B indoors wherever NM-B is allowed, though it is stiffer and more time-consuming to strip than indoor NM-B.
Does UF-B need conduit where it comes out of the ground?
Yes. Under NEC 300.5(D), direct-buried cable emerging from grade must be protected from physical damage by an approved raceway (such as Schedule 80 PVC) from below grade up to at least 8 feet above finished grade or into the enclosure.
- NFPA 70 (National Electrical Code) 2023 — Table 300.5(A), Sections 300.5(B), 300.5(D), 334.12(B)(4), 334.80, and Article 340
- Southwire Type NM-B and Type UF-B Cable Technical Spec Sheets