How to Wire a Light Switch

Before you attempt to fix a faulty light switch, make sure you understand the basics of light switch wiring.

What to Know About Light Switch Wiring Before You Try Any DIY Electrical Work
0:56

Being a smart homeowner means knowing what is going on in your home and how it works, including the electrical elements. Behind your walls, there are wires running up and down that make it possible for a light switch on the first floor to turn on lighting fixtures hanging from the ceiling. Often located near the doorway, switches allow us to control ceiling-mounted fixtures, wall sconces, and even some electrical outlets with a simple flick or tap. While it might seem like magic, understanding the basics of how to wire a light switch is added value to running your home.

stone wall with switch
Michael Partenio

It's important to know the basics of how these switches control your electricity, especially if you're planning to complete any DIY electrical work, such as repairing or replacing a switch or adding a new light fixture. By taking the time to learn how your switch wiring system works, you can reduce your risk of electric shock or fire when working with switches.

Once you know how to wire a light switch, you’ll be able to install dimmer switches.

Check out our comprehensive guide below to learn the ins and outs of light switch wiring, including information on power-through and end-line switches.

End-Line Switch Wiring
Dave Toht

How Does Light Switch Wiring Work?

Wiring a light switch depends on where the power enters. The power may come into the light box first or the switch box. This difference determines whether you have a power-through or an end-line switch. Here's a closer look at how each type of light switch functions.

illustration of light wiring
Illustration by Dave Brandon

Power-Through Switches

With power-through switches, electricity enters the switch box directly. The hot wire, which is known as the feed wire, travels from the service panel to the switch before going to the light fixture. Inside of the switch box, two cables are installed: one brings in power, and the other extends to the light fixture. The neutral (white) wires are connected together, while a black wire is attached to each of the switch terminals. Ground wires are not shown.

If power enters the switch box first, the neutral white wire from the panel is spliced with the white wire going to the light. The hot black wire passes through the switch to the fixture. Operating the switch interrupts the electricity, controlling the light.

illustration of light wiring
Illustration by Dave Brandon

End-Line Switches

If power goes to the fixture before heading to the switch, you have "end-line" wiring. Only one cable enters the switch box, coming from the fixture. The white wire to the switch should be marked black to indicate that it is hot. (Ground wires are not shown.)

If the line carrying power comes into the light box first, the circuit must still be wired so the switch interrupts the black line. The white wire from the service panel is wired to one side of the light. The black wire is spliced to a black wire in a cable that runs to the switch. That cable's white wire is also connected to the switch and runs back to and is connected to the light. Flipping the switch interrupts the flow of electricity, and the switch does its job.

Because the white wire from the switch to the light is now a hot wire, it must be marked to show it is hot.

Wrap a piece of black electrician's tape around it at both ends or color the end black with a marker to show that it carries power.

Frequently Asked Questions

  • How do you tell if a light switch is wired correctly?

    A continuity tester can tell you whether the switch is wired correctly. Scorch marks, strange odors, frequently blown fuses, or loose wiring can also indicate that there is an issue.

  • What happens if you wire a light switch backward?

    Wiring a light switch backward can cause overheating that can damage the electrical system. It can also cause shock or electrocution, so if you're not comfortable changing the light switch on your own, a professional can always do the job for you.

  • How much does it cost for an electrician to replace a light switch?

    A light switch replacement will typically cost you between $50-$150. The cost will depend on the type of switch that is being installed and on whether there needs to be any changes to the home's wiring.

Was this page helpful?

Related Articles