Wire Color Code: Decoding Electrical Wire Colors

There's a reason for that rainbow of wires

Hands working on exposed outlet wiring
Photo: Wattanaphob Kappago / EyeEm / Getty Images
Hands working on exposed outlet wiring
Photo: Wattanaphob Kappago / EyeEm / Getty Images
Highlights
  • Electrical wires are wrapped in colored insulating casings to indicate each wire’s purpose.

  • Green, green with yellow stripe, or bare copper are ground wires.

  • Black wires are hot wires that run to the electrical outlet from the switch.

  • Red wires are hot wires common in a 240-volt outlet or when a wall switch controls the outlet.

  • Blue and yellow wires are hot wires for ceiling fans and three- or four-way switches.

  • White or gray electrical wires are neutral wires.

Get quotes from up to 3 pros!
Enter a zip below and get matched to top-rated pros near you.
Geo Icon

Unless you’re a skilled electrician, you may not realize that electrical wires speak their own language—with their colors. All home electrical wires made in the U.S. follow standard wire color codes set up by the National Fire Protection Association. Each electrical wire color identifies which wires are hot, which are neutral, and which are ground. 

Before you try to repair a faulty switch, change an overhead light fixture, or splice wires, learn about the colorful—and incredibly important—world of electrical wiring. Before we begin, it’s important to note that working with any type of electrical wiring is best left to a professional because it can be very dangerous and even fatal.

Angi Tip

Knowing proper electrical terminology is key when working with wires. The term “hot” means that the wire is carrying power from the electrical panel to its destination. A ground wire carries electricity to the ground during an abnormal electric current. Neutral wires carry electricity back to the electrical panel.

Heather Ayer
Staff Writer, Angi

What Are the Different Wire Color Codes?

Breakdown of wire color codes, including black, red, blue, and yellow being hot wires

If you’ve ever felt a little jolt when accidentally coming in contact with an exposed wire or trying to repair a switch, you know how dangerous electrical wiring can be. 

Thankfully, the different electrical wire coatings around the copper conductor wires can help you identify all the clues you might need to determine whether the wire is a ground, hot, or neutral.

Ground Wire Colors: Green, Green With Yellow Stripe, or Bare Copper

Green is the most common ground wire color, but green wires with yellow stripes and bare copper wires (with no colored insulation) are also ground wires. Ground wires are conductors, like shock absorbers, whose purpose is to give electricity a safe place to go—into the ground below your home.

A ground wire helps the positive charges in your home’s outlets and electrical panels get to the ground in a direct, controlled, and safe way, where they can be released without the risk of fire or an electrical shock. 

In other words, these wires reduce the risk of an electrical overload by redirecting excessive electricity during a surge from things like a short circuit or lightning strike.  

Chances are, if you have a newer home built after 1960, you have a properly grounded system. However, if your home was built before 1960, there’s a safe and easy way to make sure your electrical system is grounded. Just take a look at your outlets. 

  • Grounded outlets have two slots and a D-shaped slot. These are connected to a ground wire. 

  • Outlets with only two slots but missing the D-shaped slot may not be connected to a ground wire. 

Still not sure? Don’t risk the chance of getting shocked and suffering severe or fatal injuries and instead reach out to a local electrician.

Black: Hot Wire

You may have built simple circuits in science class using a battery and a light bulb, with electrical current traveling from the battery (the source) to the bulb, and then back to the source. The wire that carried the electricity was the hot or live wire. 

In your household’s wiring, this wire is typically black, but it may also be red (more on that in a second). Black wires are always hot wires that carry electricity. 

You should always treat these with extreme care. They feed a switch or outlet and are also sometimes used as switch legs or the connection that runs to the electrical outlet from the switch. 

Red: Hot Wire

You will usually only see a red wire when an outlet is a 240-volt outlet or when a wall switch controls the outlet. In this case, when the switch is "on," the red wire will supply power to the outlet instead of the black wire. Like black electrical wires, red wires are also hot or live wires. 

Red can also be the connecting wire between two smoke detectors that are hardwired. Also, if your circuit box is wired for 240 volts instead of 120 volts, you may even see both red and black wires. 

“Another common location where you can see a red wire is a 3-way switch,” says Tyler Keezer, home energy specialist at Switch Electric. “This is when you have two switches in a home that control the same light. 

The red wire is used as a second path to send electricity down from one switch to the other. When you’re working on these switches, you need to use caution because the red wire can also have voltage on it depending on what position the 3-way switches are currently in.”

Blue and Yellow: Hot Wires

It’s uncommon to see blue and yellow wires in a typical outlet. While these wires are live wires and carry power, you might only see yellow wires as switch legs to ceiling fans or outlets controlled by light switches. 

You may also see blue wires used in three- or four-way switches. For example, if you have a light switch at the bottom and top of a staircase that controls the same light fixture. 

This is very uncommon, though, and typically you will see a red wire in this type of configuration as mentioned earlier. You may have seen blue wires if you’ve ever wired a three-way switch or a four-way switch.

White or Gray: Neutral Wires

White or gray electrical wires are neutral wires; white wire is more common than gray in most households. The purpose of a neutral wire is to provide a return path for electricity in a circuit, and typically connects at the main electrical panel to a single conductive piece of metal known as a neutral bus bar. 

Although they are called neutral wires, they can still carry electrical current, so as always, it's best to treat these wires cautiously.

Fixing electrical problems is not as simple as changing a light bulb. In fact, the U.S. Fire Administration lists electrical malfunction as one of the top causes of house fires. 

Wires are color-coded for a reason, so before you start tinkering with an outlet or installing a new appliance in your home, make sure you understand the differences and treat all of them with extreme caution.

How Much Does It Cost to Hire an Electrician? 

For the most common jobs, hiring an electrician will cost between $163 and $535. More extensive electrical work will cost more, as hiring a pro costs between $50 and $100 per hour. The cost to hire an electrician can depend on the size of your job as well. If you’re rewiring your entire house, for example, it can cost between $1,500 and $10,000, while adding a light switch usually costs between $85 and $200.

DIY vs. Hiring a Pro 

Electrical work is extremely dangerous and can even be deadly if done incorrectly. Hiring an electrician will save you from injuries, property damage, and potential house fires. Also, attempting to do electrical work yourself can void your homeowner’s insurance and will not cover any damage done to the home because you did the work yourself and without permits.

Frequently Asked Questions

Wire color codes vary depending on the region. For instance, the United Kingdom has updated its wiring codes to match Europe's color system. The United States wiring color code is different, as is Australia's. Because the color code system isn’t universal, it’s essential to hire an experienced electrician to perform any electrical work to ensure it is done correctly.

The color of your cable will help you to identify its function. In the U.S., the National Electrical Code (NEC) designates the color code for electrical cables. “Hot” cables are black, red, and blue. In cases of higher voltage lines, orange might also be used to indicate a hot cable. White or gray indicates a neutral, and green or green with a yellow stripe indicates a ground.

In most cases, line wires are located at the bottom of a panel or device, while load wires are located at the top. Line wires are generally black, while load wires are typically red or black. To tell for sure, you can use a multimeter or volt pen to test the wire. A live or line wire will always carry a charge, while a load wire will only carry a charge when it’s in use.

Need professional help with your project?
Get quotes from top-rated pros.
The homeowners guide to electrical services
From average costs to expert advice, get all the answers you need to get your job done.
Beautiful exterior home lit up at dusk
Feb 21, 2025
Feb 21, 2025
If your outside electrical meter box has sustained wear and tear, it might be time for a replacement. How much it costs to replace an electrical meter box depends on labor, model, and box type.
Knob and tube wiring in a house
Feb 21, 2025
Feb 21, 2025
Considering replacing your home’s knob and tube wiring with a contemporary electrical system? Find out what costs and considerations may be involved.
Mint green toaster plugged into outlet on kitchen countertop
Feb 21, 2025
Feb 21, 2025
The average cost to install an electrical outlet is $133 to $296 each. This guide explains what factors impact the total cost of installing an outlet.
African-American father holding EV charger, ready to plug it into red car outside their home
Feb 26, 2025
Feb 26, 2025
When it’s time to install an EV charger, you’ll need to decide whether to upgrade your panel. Learn how to determine whether your electrical system is ready.
close up shot of blue and brown wire
Feb 26, 2025
Feb 26, 2025
Understanding what wire colors mean will help you complete electrical projects safely. Follow this guide to distinguishing blue and brown wires.
man testing fuse box in house
Feb 27, 2025
Feb 27, 2025
Selecting the right wire size helps your electrical system run safely and efficiently. Find out the correct wire size for 100-amp service panels.
Share project details to get started.