Electrical Wiring Color Coding System

illustration of electrical wiring codes

Illustration: Catherine Song. © The Spruce, 2018

Opening up an outlet or light switch box, you might be confronted with a bewildering array of wires of different colors. Black, white, bare copper, and other colors closely intermingle, yet each one has its own specific purpose. Knowing the purpose of each wire will keep you safe and your house's electrical system in top working order.

Electrical Cable and Wire Color Markings

Non-metallic (or NM) 120-volt and 240-volt electrical cable comes in two main parts: the outer plastic sheathing (or jacket) and the inner, color-coded wires. The sheathing binds the inner wires together, and its outer markings indicate the number of wires and size of wire (gauge) within the sheathing. The color of the sheathing indicates recommended usages. For example, white sheathing means that the inner wires are 14-gauge and yellow sheathing indicates that they are 12-gauge.

But looking deeper, the color of the wires inside of the sheathing reveals that different colored wires serve different purposes. The National Electrical Code (NEC) says that white or gray must be used for neutral conductors and that bare copper or green wires must be used as ground wires. Beyond that are general, industry-accepted rules about wire color that indicate their purpose.

Black Wires: Hot

Black insulation is always used for hot wires and is common in most standard household circuits.

The term "hot" is used for source wires that carry power from the electric service panel to a destination, such as a light or an outlet. Even though you are permitted to use a white wire as a hot wire by marking it with electrical tape, the opposite is not recommended or allowed. In other words, do not use a black wire as a neutral or ground wire, or for any purpose other than for carrying live electrical loads.

Red Wires: Hot

Red wires are used to designate hot wires.

Red wires are sometimes used as the second hot wire in 240-volt installations. Another useful application for red wires is to interconnect hardwired smoke detectors so that if one alarm is triggered all of the others go off simultaneously.

White Wires With Black or Red Tape: Hot

When a white wire is augmented with a red or black color marking, this often indicates that it is being used as a hot wire rather than a neutral wire. Typically, this is indicated with a band of black or red electrical tape (but other colors may be used) wrapped around the wire's insulation.

For instance, a white wire in a two-wire cable may be used for the second hot wire on a 240-volt appliance or outlet circuit. This white wire should be looped several times around with black electrical tape to show that it is being used for something other than a neutral. 

Bare Copper Wires: Ground

Bare copper wires are the most common type of wire used for grounding.

All electrical devices must be grounded. In the event of a fault, grounding provides a safe pathway for electricity to travel. The current literally passes back to the ground or earth. Bare copper wires connect to electrical devices, such as switches, outlets, and fixtures, as well as metal appliance frames or housings. Metal electrical boxes also need their own ground connection because they are made of a conductive material. Plastic boxes are nonconductive and do not need to be grounded.

Green Wires: Ground

Green insulated wires are sometimes used for grounding.

Ground screws on electrical devices are often painted green, too. Never use a green wire for any purpose other than for grounding.

White or Gray Wires: Neutral

White or gray indicates a neutral wire.

When examining a white or gray wire, make certain that it has not been wrapped in electrical tape. This would indicate a hot wire. Older wires sometimes may lose their electrical tape wrapping. So, if the box has a loose loop of tape inside of it, there is the possibility that it may have come off of the neutral wire.

The term neutral can be dangerously deceiving as it appears to imply a non-electrified wire. It is important to note that neutral wires may also be carrying power and can shock you. While wires designated as hot (black or red insulated wires) carry power from the service panel (breaker box) to the device, neutral wires carry power back to the service panel. Thus, both hot and neutral wires have the potential to shock and injure you.

Blue and Yellow Wires

Blue and yellow wires are sometimes used as hot wires inside electrical conduit.

Rarely are blue and yellow wires found in NM cable. Blue wires are commonly used for travelers in three-way and four-way switch applications.