Skip to Main Content Skip to Footer Content

Mr. Electric Blog

Home Safety

Electrical Wire Codes


If you live in the United States and your home was built after the 1940s (or your outdated wiring has since been updated), you can expect the electrical wires behind your walls to follow certain color standards. Specific colors identify each wire’s function in a circuit. Learning these residential electrical color codes before attempting any type of do-it-yourself (DIY) electrical system repair is critical.

Just remember, all electrical wires could carry a current at some point, so treat every color wire with equal caution. If you have any hesitations, leave electrical installation and upgrades or electrical repairs to one of our qualified professionals.

Mr. Electric infographic detailing what do electrical wire colors mean?

What Do Electrical Wire Colors Mean?

Black Electrical Wires

This color of wire is used to transfer power to switches and outlets in all types of circuits. Also, black wires are often used as switch legs in circuits, which is the connection linking a switch to the electrical load. Consider all black wires to be live at all times.

Red Electrical Wires

In 220-volt circuits, red wires are the secondary live wires. Like black wires, they can also be used in switch legs. In addition, red wires are used to connect hardwired smoke detectors to the home’s power system. It’s possible to link two red wires together or a red wire to a black wire.

Blue and Yellow Electrical Wires

While wires in these colors carry power, they are not used in typical outlet wiring. Instead, blue and yellow wires are used as the live wires pulled through a conduit. For example, you might see yellow wires as switch legs to ceiling fans, structural lights, and outlets paired with light switches. Then, blue wires are most often used by travelers for three- or four-way switches (for instance, if you have switches at the top and bottom of a staircase that controls the same light, that’s a three-way switch).

White and Gray Electrical Wires

If you find wires in either of these colors, you’ve located the neutral wires. White is most commonly used, but gray wires serve the same function. The purpose of a neutral wire is to connect to the neutral bus bar, a conductive piece of metal within an electrical panel that attracts the electric current for distribution throughout the house. White and gray electrical wires can only be connected. While they’re called “neutral” wires, they may still carry a current, especially if the current load in the circuit is unbalanced, so handle these wires cautiously.

Green Electrical Wires

The purpose of green wires is to ground an electrical circuit. They connect to the grounding terminal in an outlet box and run to the ground bus bar in an electrical panel. In this way, green wires act as a fail safe, giving electricity a place to escape into the ground if a live wire within the circuit touches metal or something else conductive. Green wires can only connect to other green wires. Remember, if there’s a fault somewhere in your circuit, green wires could be live, so treat them with caution.

Person working on home electrical wiring.

Trust Mr. Electric for Home Electrical Wiring Installations and Upgrades

With this house electrical wire colors guide, you hopefully have a better idea of what wires accomplish which tasks. You may feel comfortable completing simple electrical upgrades yourself, but you can trust the service professionals at Mr. Electric® to handle the job for you.

To get a quote from your local Mr. Electric for your upcoming wiring project, you can schedule an appointment online or call us.

This article is intended for general informational purposes only and may not be applicable to every situation. You are responsible for determining the proper course of action for your home and property. Mr. Electric is not responsible for any damages that occur as a result of this blog content or your actions. For the most accurate guidance, contact the Mr. Electric location nearest you for a comprehensive, on-site assessment.

FAQs About Electrical Wire Color Codes

The safety of your business, customers, and staff are the top priority of every Mr. Electric service professional. Our safety-first commitment to solving your electrical issues includes a meticulous attention to detail on every job. Our commitment also includes using our years of experience to answer your questions. Below are answers to some of the most frequently asked questions about electrical wire color codes.

Are electrical wire color codes the same in every home?

Most U.S. homes follow the National Electrical Code (NEC), but older homes or DIY projects may have variations. If you're unsure, always consult a licensed electrician to ensure everything meets code.

What happens if I mix up electrical wire colors?

Incorrectly wiring hot, neutral, or ground wires can result in shocks, shorts, or fire hazards. It’s critical to follow the correct electrical wire color code. If you are unsure about wiring or any form of electrical work, consult a licensed electrician and do not attempt DIY.

Do wire color codes apply to both AC and DC systems?

Both AC and DC systems use wire color codes, but the meanings differ. Wire color codes in AC systems (most residential and commercial electrical systems) typically indicate the role of each wire in the circuit (e.g., live, neutral, ground). In DC systems (found in electronic devices, battery chargers, solar power, and vehicles), the color codes help distinguish between positive and negative conductors.

AC systems (in the U.S.):

  • Black or Red: Hot (live) wires
  • White: Neutral wire
  • Green or Bare Copper: Ground wire

DC systems:

  • Red: Positive (+)
  • Black: Negative (-)
  • Green or Bare Copper: Ground wire

Can I rewire something myself if I understand the color codes?

Even if you understand electrical wire colors, rewiring projects can still be complex and dangerous without proper training. In addition to a thorough understanding of electrical systems, rewiring projects require specialized tools and may involve permits. For safety and code compliance, trust a licensed electrician to handle your wiring needs safely.

Are there different electrical wire color codes for 220-volt appliances?

Yes—220-volt appliances often use a black and red wire for two hot wires and a white neutral. Understanding the correct configuration is key to safe operation. If you’re installing a high-voltage appliance, consult with an electrician to make sure you understand the variations in 220V wiring.

Can wire colors vary by country?

Absolutely. Different countries use different electrical wire color codes, and mixing systems can be dangerous. If you’ve moved into a home wired outside U.S. standards, it’s best to have it reviewed by a licensed professional.

Book an Appointment

By checking this box, I agree to opt in to receive automated SMS and/or MMS messages from Mr. Electric, a Neighborly company, and its franchisees to the provided mobile number(s). Messages & data rates may apply. Message frequency varies. View Terms and Privacy Policy. Reply STOP to opt out of future messages. Reply HELP for help.

By entering your email address, you agree to receive emails about services, updates or promotions, and you agree to the Terms and Privacy Policy. You may unsubscribe at any time.

About Mr. Electric

Established in 1994, Mr. Electric® is a global franchise organization providing electrical installation and repair services. Recognized by Entrepreneur magazine among its “Franchise 500,” Mr. Electric franchisees provide these services to both residential and commercial customers at almost 200 locations worldwide. Mr. Electric is a subsidiary of the Neighborly® family of service franchises.
Learn More

Our Special Offers On Electrical Services

Your safety is important to us, which is why we offer discounts to ensure your electrical systems are working properly. Just mention the coupon below when scheduling your appointment, and we will check your home’s electrical system for any signs of deterioration.

  • $25 Off

    Any Electrical Service

    New customers only. Not valid with any other offer. All services are performed by independently owned and operated franchises. Terms and Limits Apply. No cash value. Valid only at participating locations. Offer must be presented at time of order. Services may vary by location. Other restrictions may apply. © 2025 Dwyer Franchising LLC. For full details, terms, and address visit neighborly.com/terms-of-use.

    Expires: 12/31/2025 Thunderbolt watermark.
    Claim Offer
  • Complimentary Home Electrical Safety Check

    With Every Service

    All services are performed by independently owned and operated franchises. Terms and Limits Apply. No cash value. Valid only at participating locations. Offer must be presented at time of order. Services may vary by location. Other restrictions may apply. © 2025 Dwyer Franchising LLC. For full details, terms, and address visit neighborly.com/terms-of-use.

    Expires: 12/31/2025 Thunderbolt watermark.
    Claim Offer

Find Your Local Mr.Electric!

Let us know how we can help you today.

*Indicates a required field

Call us at (844) 866-1367
Mr. Electric electrician arriving to perform electrical repair service.