3-Way Light Switch

A 3-way switch (known in redstone logic as an XOR or XNOR gate) lets you control a single output—such as a light, door, or piston—from two different levers. Flipping either lever will always toggle the output on or off, no matter what position the other lever is in. It is ideal for hallways, rooms with two entrances, and adventure map puzzles.

Logic GatesBeginnerJava Edition
3-Way Light Switch video tutorial

Video: Minecraft: 3-Way Switch Redstone Tutorial (188) by MMAPGaming

How to build it

  1. Dig a Small Trench and Build the First AND Gate

    Carve a shallow trench for your wiring and set up a traditional AND gate using solid blocks, two redstone torches on top, a piece of redstone dust between them, and an output redstone torch on the front side of the center block.

  2. Build the Second Simplified Gate

    Next to your first gate, place a block with a redstone torch attached to it to act as a simplified NOR/AND gate where both incoming dust lines must be unpowered for the torch to turn on.

  3. Place the Two Input Levers

    Place two levers on your input blocks. Run a line of redstone dust from each lever so that both levers feed into both the traditional AND gate and the simplified gate.

  4. Connect the Outputs Together

    Run a line of redstone dust along the bottom connecting the output torches of both gates into a single shared wire. If either gate's output torch turns on, this shared line will power up.

  5. Attach Your Output Device

    Place a piston, redstone lamp, or door at the end of the shared output wire. Flip either lever to test—each flip of either lever should toggle the device on and off.

How it works

This 3-way switch works by combining two logic gates that detect opposite matching states into one output:

  • Traditional AND Gate: The top torches invert the two lever inputs. Only when both levers are ON do both top torches turn off, allowing the front output torch to turn on.
  • Simplified NOR Gate: The two lever lines run directly into a single block holding a redstone torch. Only when both levers are OFF does that torch turn on.
  • Combined Output: Both output torches connect to the same bottom redstone line. Whenever the levers match (both on or both off), one of the two torches lights up and powers the piston; when the levers are in different states, both output torches stay off. Flipping either lever always changes whether the two inputs match, toggling the output every time.

Tips & variations

  • Ultra-Compact Repeater Version: You can shrink the footprint by placing Redstone Repeaters between the parallel lines and the torch blocks. The repeaters keep adjacent redstone dust lines from merging and stop back-feeding power from turning off the wrong torch, at the cost of a small repeater delay.
  • 4-Way Switch (3 or More Levers): To control one output from three levers, build two 3-way switches. Connect your first two levers to the first 3-way switch, then feed its output into one input of the second 3-way switch, and wire your third lever to the remaining input. You can chain even more switches the same way.
  • Adventure Map Lever Puzzles: Split each lever's redstone line so it feeds into two different 3-way switches controlling different pistons across a lava bridge. Players must figure out which combination of levers raises all the bridge pistons at once.

Frequently asked questions

Why is it called a 3-way switch if it only uses two levers?
The name comes from real-world household electrical wiring, where a '3-way switch' setup uses two wall switches to control a single light fixture from two ends of a room or hallway.
How do I add a third or fourth lever to control the same light or piston?
Build a second 3-way switch circuit and plug the output of your first 3-way switch into one of the inputs of the second circuit, then connect your third lever to the remaining input.
Why are my redstone lines connecting to each other in the compact design?
Adjacent redstone dust automatically links together. Use redstone repeaters to direct the signal straight into the blocks so the parallel lines cannot merge.

Components used

More xor gate