How to Install an Electrical Junction Box

Installing an electrical junction box allows you to safely connect multiple wires in one enclosed space. Junction boxes provide access to electrical wires for maintenance, inspection or the installation of additional circuits. Following proper protocol when installing these boxes is crucial for safety and functionality. In this comprehensive guide, we’ll walk through the complete process of installing an electrical junction box to meet code and protect your electrical system.

Choose an Appropriate Junction Box

Choosing the right type of junction box for your needs is an important first step. Consider the following when selecting a junction box:

Indoor vs. Outdoor

  • Indoor boxes are made of plastic or metal and can be mounted on drywall, framing or concrete walls. Look for UL-listed nonmetallic boxes if installing on concrete.
  • Outdoor boxes must be weatherproof and constructed from durable, corrosion-resistant materials like cast metal or PVC. Make sure any outdoor box is UL-listed for wet locations.


  • Size the box based on the number of wires that will join inside. Junction boxes are available in different cubic inch sizes.
  • As a rule of thumb, allow at least 2 cubic inches per wire, excluding ground wires. For example, a box with five 14-gauge wires would need at least 10 cubic inches.

Single-gang vs. Double-gang

  • Single-gang boxes accommodate one switch or outlet. Choose a double-gang box to install two devices side-by-side.
  • Gang boxes are available in 1, 2, 3 or 4-gang configurations. Measure existing switches or outlets if replacing to ensure proper fit.

Gather Materials

Once you’ve selected the proper junction box, gather the other items you’ll need for installation:

  • Junction box
  • Cover plate
  • Screws for securing box and cover
  • Clamps for securing wires
  • Mounting hardware like nails or screws for surface-mount boxes
  • Hammer drill with appropriate concrete drill bits for masonry installations
  • Drywall saw or utility knife if installing in existing wall
  • Terminal screws for attaching wires
  • Wire connectors or splices
  • Electrical tape
  • Nonmetallic cable clamps or connectors as needed
  • Strain relief if required

Make sure all equipment is UL-listed and rated for the type of installation.

Turn Off Power

Before getting started, turn off power to the circuit you’ll be working on at the main panel. Use a contact voltage tester to confirm power is off. Lock out the panel and tag it “out of service” for safety.

Failing to cut power can result in electrocution, shocks or damage to equipment. Do not skip this critical first step!

Choose Box Location

Consider the following when determining junction box placement:

  • The box must be accessible and not covered by drywall, insulation, furnishings or other obstructions. Leave room for the box cover to open fully.
  • Indoor boxes must be installed on framing or other solid backing material. Position between studs requires an approved ceiling or pancake box.
  • Leave at least 6 inches of free conductor inside the box for easy wire splicing.
  • Outdoor boxes should be accessible but inconspicuous. Install them at least 12 inches above grade or anticipated snow line.

Refer to local building codes for exact indoor or outdoor mounting height requirements.

Mount the Junction Box

Use the appropriate technique below based on the type of surface you’re installing the box on:


Cut a hole in the drywall using a drywall saw or utility knife, just large enough for the electrical box to fit into. Secure the box directly to exposed wall studs or framing with screws through the provided mounting holes. The box should fit snugly against the wall’s surface.


Drill appropriately sized holes at least 1 inch deep using a hammer drill and masonry bit. Insert box mounting anchors or inserts then secure the box with screws. Alternately, some masonry boxes allow mounting with expansion bolts tightened directly into the concrete.


For surface conduit runs, use the provided screw holes on the box to mount directly to the wall with corrosion-resistant screws. Backs of surface-mount boxes also have knockouts to feed conduit through. Use proper conduit connector fittings.

Always check boxes for level and plumb when surface-mounted. Use shims behind the box if necessary.

Connecting and Securing Wires

With the box securely mounted, the next step is to bring in and connect the wires.

Feed Wires into the Box

Bring the cable or conduit into the junction box through one of the provided knockouts and/or connectors. Remove any knockouts when bringing cable directly into the box. Use proper conduit and cable clamps as you feed wires in.

Strip Wires

Strip off about 1/2 inch of insulation from each wire using a wire stripper. Take care not to nick or cut wire strands.

Attach Grounds and Splice All Wires

First, use provided screw terminals to connect all ground wires. Use approved splicing methods to connect the remaining wires:

  • Twist-on connectors – Twist wires together in a clockwise direction, then twist connector over wires.
  • Push-in connectors – Strip 1/4-1/2 inch insulation, then firmly push wires into connector holes.
  • Terminal screws – Loop wires clockwise around screws, then tighten screws to clamp wires.
  • Wire nuts – Twist connector onto wires with clockwise twisting motion until tight.

Secure Wires

After connecting wires, gently fold them into the box. Use cable clamps to secure cables entering the box and provide strain relief.

Allow Slack

Leave at least 6 inches of extra slack on each wire inside the box. Coiled slack allows wires to extend out fully for future modifications.

Install Cover Plate

With all wires properly connected and secured inside, the final step is to attach the junction box’s cover plate:

  • For surface-mounted conduit boxes, use weatherproof conduit hubs to align and attach conduit prior to installing cover. Apply weatherproof sealant on outdoor boxes.
  • Carefully align cover plate and screws to avoid pinching wires. Tighten screws securely but do not overtighten.
  • Make sure grounding screws on metal plates make good contact with box for grounding continuity.
  • Covers for damp locations must extend past the box for proper protection. Use bubble covers for added moisture protection outside.
  • Lock any open knockouts on outdoor boxes using plugs to maintain weather resistance.

The junction box is now ready to be powered up! Take your time and be meticulous when installing boxes to create safe, reliable connection points for your electrical system.

Electrical Junction Boxes: Frequently Asked Questions

Installing and working with electrical junction boxes brings up a lot of questions for DIYers. Here are answers to some of the most common junction box FAQs:

Do junction boxes have to be accessible?

Yes, the National Electrical Code (NEC) requires junction boxes to remain accessible. Junction boxes cannot be buried behind drywall, insulation or other permanent construction that obstructs access to the box interior. Proper access allows for inspection, maintenance and repairs.

How many wires can you put in an electrical junction box?

This depends on the cubic inch capacity of the box. As a general rule, allow at least 2 cubic inches per wire for any box up to 21 cubic inches. For larger boxes over 21 cubic inches, allow 2.5 cubic inches per wire. Ground wires do not count towards wire fill calculations.

Should junction boxes be grounded?

Yes, junction boxes must be grounded to provide a safe path for any electrical fault or short circuit. Metal boxes are grounded through their physical contact with grounded cables and conduits. Non-metallic boxes should have a ground wire attached from box to grounded conductor.

Do junction box covers have to be screw-in?

Junction boxes require securely fastened covers to contain sparks or arcing in the event of an electrical issue. Per NEC, covers on most junction boxes must utilize screws or other permanent fasteners like clamps. Snap-on covers are only NEC-compliant for some recessed lighting and ceiling fan boxes.

Can you mount a junction box on drywall?

Directly mounting boxes on drywall alone is not advised. The proper method is to install the box to wall studs or other structural support, allowing the box to sit flush with the drywall surface. Some special lightweight or low-voltage boxes can mount directly on drywall.

How do you wire a junction box with multiple cables?

Use wire nuts, push-ins or terminal blocks to connect matching conductors from each cable. For example, splice all ground wires together, all white (neutral) wires together, and all remaining colored (hot) wires together within the box. Maintain proper polarity throughout.

What are junction box danger signs to watch out for?

Signs of trouble with a junction box include:

  • Loose, damaged or burnt wires
  • Signs of overheating like melted plastic or scorch marks
  • Excessive buzzing, sizzling or arcing sounds
  • Tingling sensation or shocks from touching box or devices
  • Flickering or dimming lights
  • Fuses blowing or circuit breakers tripping frequently

Any danger signs mean electrical issues exist within the junction box. Turn off power immediately and contact an electrician to inspect and repair.

Can you bury a junction box?

No, junction boxes are required by the NEC to remain uncovered and accessible. Burying them behind drywall or other materials goes against code. However, the NEC does make a special exception for “buried” splice boxes located underground, as long as they utilize watertight electrical splices.


Installing a junction box provides a safe, enclosed space to connect wires and expand circuits. While the process requires following strict safety protocols, the project can certainly be DIYed by any competent homeowner. The key is using extreme care, patience and attention to detail.

Use the proper box for the location, mount it securely, connect wires neatly and allow slack. Changing out a old junction box is also a great way to potentially upgrade to a larger capacity box as your home’s wiring needs evolve. With some basic electrical know-how and our tips above, you can install junction boxes to create more modern, up-to-code wiring in any home.