How to Install an Electrical Junction Box

Project Overview
  • Working Time: 17 mins
  • Total Time: 20 mins
  • Skill Level: Intermediate
  • Estimated Cost: $5 to $10

The National Electrical Code (NEC) dictates that no wiring splices are allowed outside of an approved enclosure. Any standard outlet, switch box, or light fixture box can serve as an approved enclosure, but where a wiring splice needs to occur in other locations along the circuit, the approved enclosure is usually a junction box.

Electrical junction box being nailed to wooden post for installation

The Spruce

A junction box is simply a standard electrical box that is mounted securely to the house framing or another structure, containing the connection (splice) of two or more circuit cables. The cables are secured to the box with cable clamps (or conduit connectors, if the circuit includes conduit), and the box must have a removable cover to create a complete enclosure. Junction box covers must remain accessible; they cannot be covered with drywall or other surface material.

A junction box is most often used where an electrical circuit branches off in two or more directions from a location where an outlet or fixture is not practical. It is also a common solution when an electrical circuit is being extended.

Choose the Right Junction Box

Make sure to buy a junction box appropriate for your installation. Outdoor locations, for example, require a weatherproof junction box with gaskets to prevent moisture intrusion. And make sure the junction box is large enough for the number of wiring connections you will be making. For example, the smallest 2-by-4-by-1-1/2-inch-deep box can comfortably splice only two cables (four or five conducting wires), while the largest 4-by-4-by-2-1/8-inch-deep boxes can handle as many as four to six cables (up to 18 individual conducting wires). For easy installation, many DIYers choose the largest box that is practical for the application.

Before You Begin

Turn off the power to the circuit you'll be working on by switching off the appropriate circuit breaker in your home's service panel (circuit breaker box). Test all of the wires you'll be working on with a non-contact voltage tester. The test should confirm that no voltage is present in any of the wires.

Need more help? Talk to an electrician near you

Our partners can help you compare quotes from top-rated professionals near you


Get a Quote

The offers that appear in this table are from partnerships from which The Spruce receives compensation.

What You'll Need

Equipment / Tools

  • Non-contact voltage tester
  • Screwdriver
  • Hammer (for a metal box)
  • Pliers (as needed for a metal box)
  • Drill-driver and screwdriver tip
  • Wire strippers (as needed)

Materials

  • Code-approved electrical box with cover
  • Cable clamps (as needed for a metal box)
  • Wood screws
  • Wire connectors

Instructions

Materials and tools to install an electrical junction box

The Spruce

  1. Mount the Box

    Separate the circuit wires at the existing splice and loosen the cables as needed to make room for the new junction box. Anchor the box to the framing (or other support structure) with screws driven through the factory-made holes in the back or side of the box, as applicable.

    Tip

    If you're using a metal box, before you do anything else (even separate the circuit wires), remove a knockout on the box for each cable that will enter the box. Use a screwdriver or hammer to break out each knockout (metal disc), then twist off the metal knockout disk with pliers.

    Blue electrical junction box mounted to wooden support with yellow wires loosened for room

    The Spruce

  2. Set Up Clamps for Each Cable

    Install a cable clamp for each cable, as needed. Standard plastic electrical boxes do not have knockouts and contain internal cable clamps. Metal boxes usually have internal clamps; if yours does not, install a locknut-type clamp for each cable. Insert the threaded end of the clamp through a knockout hole and secure the clamp inside the box with the ring-shaped nut. Tighten the nut with pliers.

    End cables clamped inside blue electrical junction box

    The Spruce

  3. Secure the Cables

    Feed the cables through the clamps and into the box. The cable sheathing (outer jacket) should extend 1/4 to 1/2 inch into the box beyond the clamp, and the individual conducting wires should extend about 6 inches into the box. If necessary, trim the wires as needed and strip 3/4 inch of insulation from the end of each wire, using wire strippers.

    Secure the cables by tightening the screws on the clamps, being careful not to overtighten and damage the cables. Plastic boxes usually have spring-tabs for clamps and do not require tightening.

    Tip

    The ends of the individual wires should be clean, straight, and undamaged, with no more than 3/4 of exposed wire beyond the insulation. Trim any damaged wires and/or strip insulation as needed, using wire strippers.

    Wire screws clamped to secure cables

    The Spruce

  4. Join the Wires

    Join the wires together with approved wire connectors, following the manufacturer's instructions.

    Join the bare copper (or green insulated) ground wires together first. If the box is metal, add a pigtail—a 6-inch length of the same type of ground wire—to the ground wire connection, then connect the loose end of the pigtail to the ground screw on the box. Special green wire nut connectors are generally used to join the grounding wires together.

    Join the white (neutral) wires together, then join the black (hot) wires together, using a wire nut or other approved connector for each wire pair. If there are red (hot) wires, join them together, as well. Confirm that all wires are secure by gently tugging on each wire.

    Bare copper ground wires joined together in blue electrical junction box

    The Spruce

  5. Finish the Job

    Carefully fold the wires into the box. Install the box cover, securing it with two screws. Code requires that the cover must be a solid "blank" without holes. Restore power to the circuit by switching on the circuit breaker.

    Wires covered with yellow covers before folded into electrical junction box

    The Spruce

FAQ
  • How many wires can a 4-inch junction box hold?

    In general, a junction box that is 4-by-4 inches with a 2 1/8-inch depth can handle up to six cables.

  • What are the wires in a junction box?

    Junction boxes contain hot (black), neutral (white), and grounding (green or copper) wires. There also might be some more wire colors for other functions.

  • Can you have too many wires in a junction box?

    Yes. When too many wires are cramped in a junction box, it can lead to overheating, short-circuiting, sparks, and fires, among other problems. Yes. When too many wires are cramped in a junction box, it can lead to overheating, short-circuiting, sparks, and fires, among other problems. There are such things known as box extenders to allow for additional wires so that the existing box is not overfilled.

The Spruce uses only high-quality sources, including peer-reviewed studies, to support the facts within our articles. Read our editorial process to learn more about how we fact-check and keep our content accurate, reliable, and trustworthy.
  1. Junction Boxes. Where Required. Electrical Continuing Education and Electrical License Renewing Services.