Hardwiring Under-Cabinet Lights With a Switch
A plain guide to hardwiring under-cabinet lights to a wall switch: planning the circuit, running cable, fitting the junction box and making safe connections.
Contents
- Plan the switch and light layout first
- Pick the power source and circuit
- Shut off and verify the circuit breaker
- Run cable and fit the junction box
- Connect the switch and the lights
- Test before the cabinets go back
- Keep the installation serviceable
- Questions about hardwired under-cabinet lights
- Can I install hardwired under-cabinet lights with a switch myself?
- Do hardwired under-cabinet lights need a junction box?
- Where should the low-voltage transformer go?
- What does a wall switch control in this setup?
- How do I know the circuit is off before wiring?
Hardwiring under-cabinet lights with a switch means giving the lights a permanent power feed from a circuit and controlling them from a wall switch. The work runs cable from a power source to a junction box above the cabinets, then on to the switch and the light fixtures. Because it involves mains wiring, the safe route is to plan the layout yourself and have a qualified electrician make the connections.
- Decide the switch position and light layout before any cable goes in.
- A junction box above the cabinets gives every connection a serviceable home.
- The circuit breaker must be shut off and verified dead before any wiring work.
- Low-voltage fixtures need a transformer or driver placed where it can be reached.
- Only a qualified electrician should open the circuit and make the final connections.
Plan the switch and light layout first
Planning the switch and light layout first keeps the cable run short and the finished cabinets tidy. Walk the kitchen at night and mark where light should fall on the counter, then mark where the switch falls naturally at the door or walkway.
A hardwired under-cabinet light needs a permanent feed, a switch leg and a neutral, so the route between the source, the switch and the fixtures matters. Sketch the path on paper and note every cabinet, stud and appliance the cable must pass.
Decide early whether the lights are line voltage or low voltage. A low-voltage transformer or driver adds a component that needs a place to sit, and that place must stay reachable after the cabinets are closed up.
Pick the power source and circuit
The power source for hardwired under-cabinet lights is a circuit that can carry the extra load. A nearby receptacle circuit or a dedicated lighting circuit can serve, and an electrician confirms which one has spare capacity.
Wall switch wiring works in one of two ways. The feed can reach the switch first and travel on to the lights, or it can reach the lights first and drop a switch leg down to the switch.
Note what else shares the circuit before adding lights. A circuit that already carries heavy appliances may not be the right host, and the electrician makes that call on site.
| Source option | What it means |
|---|---|
| Feed to switch first | Cable reaches the switch box, then continues to the lights |
| Feed to lights first | Cable reaches a junction box, with a switch leg dropping to the wall |
| Dedicated lighting circuit | The under-cabinet lights sit on their own circuit |
Shut off and verify the circuit breaker
Electrical safety begins with the circuit breaker shutoff at the panel. Switch the breaker off and label it so nobody restores power while work is underway.
Test the circuit at the receptacle or fixture with a voltage tester to confirm it is dead. A breaker that looks off can still leave a live conductor, and only a test proves otherwise.
Keep the panel closed to other users and treat every wire as live until the tester says otherwise. If the panel is crowded or its labeling is unclear, a qualified electrician should map the circuits.
Run cable and fit the junction box
A junction box above the cabinets gives the hardwired under-cabinet light circuit a serviceable point for every connection. The box must remain accessible, so place it where a cabinet door or a removable panel reaches it.
Run cable along framing or through cabinet voids where it is protected from nails and movement. Secure the cable at intervals set by the electrical code that applies where you live, and keep it clear of hot surfaces and sharp edges.
Leave enough slack at each box for a tidy connection, then trim the sheath back without nicking the conductors. An electrician checks that box fill and cable support meet the local rules before closing anything up.
Connect the switch and the lights
Connections at the switch and the fixtures follow the same logic: feed in, switch leg out and neutral through. The switch interrupts the hot conductor, while neutrals join together and pass onward.
A low-voltage transformer takes the switched feed and steps it down for the fixtures. Place the transformer where air reaches it and where someone can replace it without dismantling the cabinets.
Terminate each conductor under the correct screw or connector and tug each one to confirm it holds. Only a qualified electrician should make these mains connections, and the work must follow the wiring rules of your area.
Test before the cabinets go back
Testing before the cabinets go back saves reopening finished work. Restore the breaker only when every connection is closed and every cover is in place.
Switch the wall switch on and off and watch each fixture respond. Check that the transformer stays cool and that no flicker or buzz appears at the switch or the lights.
If a fixture fails to light, switch the breaker off again before investigating. Loose strands, a reversed switch leg or an undersized driver each produce their own symptom, and the electrician traces which one applies.
Keep the installation serviceable
A serviceable installation lets the next person reach the transformer, the junction box and the switch without tearing out cabinets. Label the breaker and note the circuit on the panel schedule.
Leave a simple diagram inside a cabinet door showing the cable route and the transformer location. A future repair or a lighting upgrade then starts from information rather than guesswork.
Check the fixtures now and then for loose mounting or warm cable, and switch the breaker off before any inspection of connections. Small habits keep a hardwired under-cabinet light setup safe over the years.
Questions about hardwired under-cabinet lights
Can I install hardwired under-cabinet lights with a switch myself?
Hardwired under-cabinet lights with a switch involve mains wiring, so the safe answer is no for the electrical connections. You can plan the layout, choose the fixtures and clear the cabinets, and a qualified electrician opens the circuit and makes the connections. Local rules decide what a homeowner may legally do.
Do hardwired under-cabinet lights need a junction box?
Hardwired under-cabinet lights need a junction box wherever cable is joined or a fixture is fed. The box keeps connections enclosed and reachable for future service. An electrician confirms the box type and size that suit your cable and fixtures.
Where should the low-voltage transformer go?
A low-voltage transformer belongs where it receives air and stays reachable after the cabinets are finished. Tucking it behind a fixed panel makes a future replacement difficult and can trap heat. The driver rating must match the fixtures it serves.
What does a wall switch control in this setup?
A wall switch interrupts the hot conductor that feeds the under-cabinet lights. The neutral passes through unswitched, so the switch must be wired into the correct conductor. Reversed connections leave the fixtures live even when the switch is off.
How do I know the circuit is off before wiring?
The circuit is off only when a voltage tester shows no power at the point of work after the breaker shutoff. A breaker in the off position is not proof on its own. Test every conductor you intend to touch.