Electrical Wire Color Codes Explained
Updated 2026-08-16 · 6 min read
Jump to a section▾
Wire colors are a useful convention that people mistake for a guarantee. Two of them are genuinely required by code; the rest are convention with real exceptions — and the exceptions are exactly where people get hurt.
What do electrical wire colors mean?
In common US residential practice:
| Color | Role |
|---|---|
| Black | Ungrounded conductor (hot) |
| Red | Second ungrounded conductor (hot) |
| White | Grounded conductor (neutral) |
| Gray | Grounded conductor (neutral) |
| Green | Equipment grounding conductor |
| Green with yellow stripe | Equipment grounding conductor |
| Bare copper | Equipment grounding conductor |
| Blue, yellow | Additional ungrounded conductors, often travelers |
Which wire colors does code actually require?
This distinction matters.
Required by code:
- Grounded conductors (neutrals) must be white or gray, or have three continuous white stripes — with specific provisions for re-identification of larger conductors
- Equipment grounding conductors must be green, green with yellow stripes, or bare
Convention rather than strict requirement:
- Ungrounded conductor colors. Black and red are near-universal practice for smaller conductors, but they aren't mandated the way neutral and ground are.
The practical consequence: you can trust white/gray to be intended as a neutral and green/bare to be a ground far more than you can trust black to be the only hot.
Why is a white wire sometimes hot?
The most common and most dangerous exception.
In a switch loop, power runs to a light fixture and a cable carries the circuit down to the switch and back. In older installations, the white conductor was often used as one of the switched conductors — meaning a white wire that is hot.
The code requires re-identification in this situation — marking the white conductor with black or red tape or paint at each accessible point.
In practice, this is frequently not done. Plenty of houses have unmarked white conductors carrying full voltage in switch boxes.
This is the single best reason for the rule below.
The rule: test, don't assume
Always verify with a tester before touching any conductor. Not sometimes — every time.
A non-contact voltage tester is inexpensive and belongs in every household. For anything beyond confirming a circuit is dead, a proper multimeter and knowing how to use it.
Reasons color alone fails:
- Unmarked switch loops with hot white conductors
- Previous owner or handyman work that ignored convention
- Very old wiring that predates modern conventions entirely
- Multi-wire branch circuits, where a shared neutral stays energized even with one breaker off — see what is a multi-wire branch circuit
- Two circuits in one box, so turning off one breaker doesn't kill everything
- Faded or discolored insulation in old wiring
That multi-wire case deserves emphasis: turning off one breaker does not necessarily de-energize everything in the box.
Common configurations
Standard 120V circuit: black (hot), white (neutral), bare (ground).
Three-way switching: black, red and white, plus ground. The red and one other conductor are travelers between switches.
240V circuit with no neutral — a water heater, for example: two hots (often black and red, or both black with one re-identified) plus ground.
240V circuit with a neutral — a range or dryer: two hots, a white neutral, and a ground.
Multi-wire branch circuit: two hots on opposite legs sharing one neutral.
See the NEMA plug chart for how these show up at receptacles.
How do you re-identify a wire?
When a conductor is used for a role its color doesn't indicate, it should be re-identified — typically with colored tape or paint at each accessible termination.
Common cases:
- A white conductor used as a hot in a switch loop → marked black or red
- A white conductor used as a hot in a 240V circuit
- Larger conductors where the required color isn't available in that size
Not doing it isn't merely untidy — it's how the next person gets surprised. If you find unmarked conductors during work, marking them is a genuine favor to whoever opens that box next.
How do you read old wiring colors?
Old installations follow older or no conventions:
- Knob-and-tube — cloth-insulated conductors, no equipment grounding conductor at all. See knob and tube wiring.
- Cloth-jacketed cable — colors may be faded, deteriorated or absent. See cloth and rubber insulated wiring.
- Old armored cable — the sheath may have served as the grounding path.
- Ungrounded circuits — no equipment grounding conductor at all, which is its own set of problems. See two-prong outlets and ungrounded circuits.
In these installations, color tells you even less. Testing is not optional.
A caution on the ground
An equipment grounding conductor should never be used as a current-carrying conductor. Two related defects worth knowing:
Bootleg grounds — a jumper connecting neutral to ground at a receptacle to make a tester show "grounded." It's not a ground, and it's dangerous. See what is a bootleg ground.
Neutral and ground bonded in a subpanel — they're bonded only at the service. See grounding vs bonding.
The bottom line
White and gray must be neutrals and green or bare must be grounds — those are code. Ungrounded conductor colors are convention, and the switch loop with an unmarked hot white conductor is the exception that catches people. Test every conductor before touching it, remember that a multi-wire circuit's shared neutral stays live with one breaker off, and re-identify anything you use off-convention.
Check circuit capacity with the home electrical load calculator, see the NEMA plug chart, or read types of electrical wire.
Frequently asked questions
Ask AI about this
Open an AI assistant with a question grounded in this page.
