I'm just a programmer who wants to add an outlet below my light switch. I did a bunch of research on this topic and decided I could tackle it. According to my research, the hot/line is the black wire going into the bottom of the switch and the load is the top wire. The neutral is the white ones that are capped off.

But here I have white wires going into the switch and black ones capped off. Are the white wires line and load and the black ones neutral? Is this perhaps wired completely wrong in such a way that happens to work? How do I determine if this is wrong and how do I go about fixing it?

white wires wired to light switch

  • 2
    ... ... ... is the whole entire circuit, or the whole entire house for that matter, done this way?! Commented Jun 14, 2020 at 22:00
  • 4
    The way to do this safely is to call an electrician.
    – chepner
    Commented Jun 15, 2020 at 12:27
  • 13
    It sure looks like this switch is wired to switch the neutral instead of the hot. That's a big bad no-no. Either that or all the wire colours are backwards... and the box is crooked and the switch is wired using the backstabs. One way or the other, this was installed by a drunk. Be careful with youtube videos - they might show you part of how to do something right but they won't give you the experience to notice when something is very wrong.
    – J...
    Commented Jun 15, 2020 at 19:46
  • 2
    Does your location in the world even permit power sockets wired to lighting circuits ?
    – Criggie
    Commented Jun 15, 2020 at 20:53
  • 3
    To back up what @Criggie says - this would not be allowable in the UK - lighting circuits should not be used for power, or vice versa.
    – MikeB
    Commented Jun 16, 2020 at 9:49

8 Answers 8


In a perfect world, black is hot and white is neutral. Unfortunately,that's not always true. I have seen houses wired opposite, against code. I've seen part of the house wired opposite. What you need to do is get a meter, not a wonder stick, and test your black group for voltage to ground. You should get 120v +-, then test white group to ground and you should get 0. If you get 0 when testing the black and 120V when testing white, then it's backwards and you or a pro should figure out why. It could be wired correctly and maybe whoever installed this switch decided to switch the neutral instead of the hot. Once you determine hot and neutral, you can think about installing your outlet.

  • 1
    Thank you for your response. I'll admit that AC is still a mystery for me and I think I'm figuring out that my initial mental model is incorrect. My (I think incorrect) mental model is that the wires took turns as to which one supplied electricity. But if I'm hearing you right, the neutral only has a current if it is fed by the hot. That is to say that the electrical panel doesn't push electrons through both wires, but pushes and pulls through one wire. Is that correct? Commented Jun 14, 2020 at 23:28
  • 2
    @JasonThompson the panel doesn't push and pull, it just supplies power. The appliance "takes" what it needs from the circuit breaker wire and sends it back through the neutral or return wire. It is a loop system. If it's a 240V appliance like an oven, then the two breaker "take turns" supplying power.
    – JACK
    Commented Jun 14, 2020 at 23:43
  • 1
    @JasonThompson If the appliance "takes" more than the rating of the breaker, the breaker will trip.
    – JACK
    Commented Jun 14, 2020 at 23:47
  • 11
    It is true that neutral and hot are both taking turns sourcing/sink electrons as the current moves back and forth. The difference is that neutral is tied to ground somewhere in the electrical system (usually in the main panel). That means that neutral is always at zero volts with respect to ground, and the hot wire is actually going +120v to - 120v with respect to ground. Larger 240v appliances have two hots that are 180 degrees apart which means one is at +120V and the other at -120V at the same time. Hook an appliance across those two hots and it sees the difference, 240V.
    – mfarver
    Commented Jun 15, 2020 at 1:38
  • 3
    Picture 2 D-cell batteries connected end to end like in a flashlight. Measure the voltage across both of them and you'll get about 3 volts, measure between either end and the middle connection and you'll get 1.5 volts. That is analogous to the 120/240 volts in a panel. From either hot to neutral you get 120 v. Across both hots you get 240v. It's not a perfect analogy due to A/C vs. D/C but hopefully this helps Commented Jun 15, 2020 at 1:59

I'm a residential electrician and thought I'd share.

You should use a tester to verify this, but the white bundle with 2 wires tied together in a wire nut and 1 coming out to your switch is the line side. The white that goes straight from the wall to your switch is your load, which goes straight up to your light.

You'd ideally just leave the switch side alone, jump one power out from your line bundle and one neutral out from your black bundle and attach them to the correct part of your new plug (and ground it obviously).

But, for reasons unknown, they used the opposite colors to wire your switch. I'd honestly just call an electrician to look at your panel and pop off some other switches and plugs to see if your whole house is that way or if they just made an oopise in that particular circuit.

Good luck!

  • 1
    I have to agree with this. Electrical code exists for a reason: to make the circuits in your house safe to use, AND to ensure that the electrician that works on this next has a good idea of what to expect. I'd strongly advise getting a professional electrician in to get this fixed up. It might cost a bit, but it's dirt cheap when compared to the value of you and your family's safety. Even a 110 volt main can kill. It's just not a risk you want to take.
    – dgnuff
    Commented Jun 17, 2020 at 1:53
  • 4
    Given this advice and everyone else's, I did test it using a multimeter. It turns out that the colors ARE correct, but the switch was wired in the neutral rather than the line. After sketching it out, I was able to rewire everything so that the switch is wired to the line and not the neutral. Commented Jun 17, 2020 at 17:04
  • Wiring the switch wrong could've killed someone. You switch it off thinking that "turned off" the light (to change a lightbulb for instance), then someone touches the live contact (since that's still connected) and ground, and they're dead.
    – Nelson
    Commented Jul 7, 2020 at 5:27

Turn the light on and poke around with a non-contact voltage sensor.

The live wires side will show as live and the neutral wires as not live. make a note of which are which.

Turn the light switch off and check both sides of the switch. the one that changed between live and not live is the one that's going to the lamp, the other side is going back to the breaker

If the switch is on the neutral side it should removed be re-done on the live side

If the wire are the wrong color the correct color should be used, but fixing that may exceed your skill level. use the correct colours to connect your outlet to the supply.

  • 1
    @JasonThompson These non-contact voltage sensors are safer and easier to use for a non-electrician than a voltmeter. You can get them at your local hardware store.
    – Moby Disk
    Commented Jun 15, 2020 at 20:12
  • 2
    They are also quite prone to false-positives when used in a confined space.
    – MikeB
    Commented Jun 16, 2020 at 9:10
  • 1
    I used a combination of the non-contact voltage sensor and multimeter. I used the non-contact sensor to determine if I had power running anywhere (I ran it near each wire) and then I used the multimeter to determine which wire exactly was the real hot. Commented Jun 17, 2020 at 17:06

It needs to be noted that a common wiring technique when wiring a switched light fixture is to run the feed from the panel into the light fixture, and then run a piece of 2-wire (plus ground) romex from the fixture to the switch. Since standard romex has one white and one black wire, wires of those two colors are connected to the switch, then, in the fixture box, one of the wires is tied to the black feed wire and the other is connected to the "hot" side of the light. This is the one case where code does not require that a white wire that can be "hot" (when the switch is on) be marked somehow (with paint or tape).

But the pictured box apparently has whites going to both sides of the switch, and there is no obvious tape or paint indicating that they are not neutral. In the US this is a fairly blatant and inexcusable code violation, and one should thus suspect that there are numerous other flaky things about the wiring.

  • 1
    You're correct. I'm not an electrician, but every time I go to do something with an outlet or light switch such as installing a smart switch, it's an all new code violation... especially in my basement. Commented Jun 17, 2020 at 17:07

Those are the colors that come in cable! Don't read anything more into it.

You see black and white because those are the colors that are built into all cable (except the cable with a third wire; that is red).

It's very common for novices to try to assign meanings to the colors. That is almost a lost cause. The only way colors have meanings is if you re-color them with colored tape. Otherwise, it doesn't tell you much. This much we know:

  • Green, yellow-green and bare are always Equipment Safety Ground. Fullstop.

  • White is first given to neutral, if that is not present it's given to always-hot, and if neither are present, then it's a dog's breakfast. Wow, that wasn't very helpful, was it?

Anyway, this job was done by a harpsichordist

When white is used for non-neutral, it's usually only 1 cable in the box, and very rarely 2 out of 3+ cables. When 3+ cables have all their whites in communication, that means White is actually neutral -- or at least, the same t hing.

Another law in the - well, almost everywhere - is that you switch the "hot" wire, so when the switch is off, the lamp is inert/safe. So normally, black (well, non-white) wires go to the switch. It was done backwards here! What exactly that means, we don't know. Either

  • In this switch box alone, the installer chose to switch the neutral wire, but white is still neutral and black is still hot. Or...

  • Harpsichordist theory: the person used white for hot (and black for neutral) throughout the circuit, renovation, or house.

Which one? That's what needs investigation. That's why ThreePhaseEel would like to peekaboo inside the panel - or at least confirm that white-to-ground is near 0 volts.

If everything else in the house is correct, then repairing this is a simple matter.

  • Note the solo white coming off the switch. Its partner black is supposed to be the switched-hot, so use red tape or shrink-tube to re-mark it red. (red is preferred for switched-hot; this is not a Code requirement but it makes wiring easier, especially for novices).
  • Remove the switch.
  • Re-mark the white pigtail black (mandatory to mark it something; black is preferred for always-hot).
  • The switch gets the black pigtail, and the red wire.
  • All neutrals go together.
  • All always-hots go together. (i.e. unmarked blacks and wires re-marked black).

* What does hot/neutral even mean, given that it's AC power? Neutral is the phase that is bonded to the grounding system, so it's (ideally) quite near natural earth voltage. Touching neutral and a water faucet is usually harmless.


Ok guys it's AC, both are live. Neutral is the identified conductor. That means it's grounded thus the name neutral. With a test meter go from your bundle of blacks to ground. Does your meter show voltage? Then do the same with the white bundle. That will tell you if the colors are mix up. If the black side lights up your tester then the person that wire the switch incorrectly. All the connections in the house should be check.If you use the white as a switch loop, it has to be taped a different color.


I thought it would be good for me to provide an answer to exactly what I did. For the sake of brevity, I'm not going to mention every time I turned off and on the power. Just infer that any time I would be manipulating the wires the power was off. Any time I was testing the wires with a multimeter, the power was on... and I was being extremely careful not to touch the wires or let the wires touch another wire of a different color.

First, I grabbed my tablet PC and drew out a diagram of the circuit. I used a voltage tester to determine that the top terminal in my original picture was hot. This told me one of two things. Either it was hot because the wire was the hot or it was hot because voltage was moving from the hot into the lights and then back down to the neutral.

Next I unscrewed the black bundle. If it also had a voltage then my first theory was correct, otherwise the white was certainly the hot. It turned out the black bundle also had a voltage. So the white indeed was neutral, the black was hot, and this switch was wired wrong. Given that I'm not a professional, I took other measurements to be sure by disconnecting wires from the switch and each other. My theory proved to be correct.

I then needed to determine which of the three bundles was my line, which one was the load going to the lights, and which one was a load going who knows where (likely another outlet). Using logic I determined that my original white wire with a voltage was likely the neutral coming from the load. The black wire in the same insulator was likely the wire going to the load. The black that had a voltage was my line and the third one was the load to who knows where.

I drew up my theory on my tablet and then wired it the correct way. I then tested it and everything worked. From there I could wire my new outlet.

Below is a picture of my "corrected" wiring. THANK YOU EVERYONE for helping an unskilled computer programmer work through this electrician work without zapping myself. 😁

enter image description here


In newer homes that use Romex wire the standard is 12 gauge with one black wire, one white wire and one bare wire. The colors are normally used as follows: black goes to hot, white goes to neutral, and bare goes to safety ground. 12 gauge wire is normally used to carry up to 20 amperes of current. 12 gauge wire is normally paired with 20 ampere circuit breakers.
In some cases 14 gauge wire is used to save costs and it is normally paired with 15 ampere circuit breakers. The wiring for a standard duplex power outlet has three connections. The hot side, that goes to the smaller slot and has a coppery color screw, the neutral side that goes to the wider slot, and normally has a silvery colored screw, and the safety ground which goes to the round slot which has a green colored screw.

When wiring a light switch it is normal to place the switch between the hot power coming from the breaker panel and the hot side of the light receptacle. It is also possible that the light receptacle and switch is wired to interrupt the neutral side of the light receptacle.

To determine what you have at the switch you will need to measure the voltage present at the switch connections and determine if the voltage remains hot no matter if the switch is on or off, on one of the connections. You must have a working light bulb present in the lighting socket for this measurement to be valid. Measuring should normally be done with the common (black) meter lead on the safety ground and the hot/active(red) meter lead on the connection being tested.
If that is true, that the voltage remains hot(120-130 volts AC) then that connection is hot from the breaker panel and can be used to power an outlet. One other thing to consider. Lighting circuits are often run with wire gauges that can carry less current as lights do not normally draw as much power as appliances plugged into duplex outlets. Using a higher number gauge, which is a thinner wire, saves money during construction but means it can only safely carry a lesser current.

I am not a licensed electrician. The electricians are licensed to know the local electrical codes where they work. Having practical knowledge does not mean wiring you do will be considered up to code or safe in the eyes of code enforcement. This can affect resale value of your home and more importantly, affect safety for your homes occupants. You will need to turn off the power to the switch you are wiring to.

You will need to verify which breaker powers that switch, unless you turn off the main breaker in which case an assistant with a flashlight is recommended. Even with the main breaker off, it is wise to verify there is no measurable voltage present on the hot wire you are tapping off of before you start your work. It is also wise to ensure no helpful but misguided family member is present who might decide to turn the breaker back on while you are working.

  • 6
    Welcome to [diy.se}! That wall of text is hard to read. Please edit your answer to break this up into some paragraphs to ease reading. I was with you up to The quandry is, if you are using standard Romex wire to run between the light receptical and the switch, there is no real standard. Since that's wrong (neutral remains on the white wire, by convention, while hot is black or red), I gave up after that. Also houses aren't "normally" wired with 12 gauge wire, the correct gauge wire is used for the circuit based on the load and the size of the breaker in the box.
    – FreeMan
    Commented Jun 15, 2020 at 15:52
  • 1
    +1 for mentioning that one should always test for live voltage even after opening breakers and switches! Don't assume, always measure! You life is on the line!
    – Zarepheth
    Commented Jun 15, 2020 at 16:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.