Skip to content
Buy Access Panels

For pros

How to install a junction box in an open or finished wall

How to install a junction box: pick a new-work or old-work box, mount it, clamp the cables, splice and ground the wires, and keep it accessible.

By Buy Access Panels Team, Product and sizing team · Published 2026-11-16 · Updated 2026-11-16 · 10 min read

Gloved hands using a cordless drill to screw a blue plastic electrical box to a wooden stud in an open wall, with a coil of white cable on the floor behind

To install a junction box, switch off the circuit breaker and test the wires dead. Fasten a new-work box to a stud or joist in open framing, or clamp an old-work box into a finished wall. Clamp each cable, splice the wires with connectors, join the grounds and fit a cover. The box must stay accessible.

This post is for a homeowner, electrician or contractor adding a box during a renovation or extending a circuit, and it follows the installation in order. If you are not sure what a junction box does, start with what is a junction box?

Turn off the power, and use a licensed electrician where required

Junction box installation is electrical work. Switch off the circuit breaker, then check every wire with a voltage tester before you touch it: a breaker label can be wrong, and one box can hold wires from more than one circuit. Many areas require a permit for new wiring, and some require a licensed electrician for this job. Where yours does, hire one.

What tools and materials do you need to install an electrical junction box?

Check the rules first. In the United States, the local code decides whether new wiring needs a permit and whether a homeowner may do it. In Canada, who may do electrical work differs by province, so ask your provincial electrical inspector.

Then gather the tools and materials:

  • The box. The right junction box for the place and the wiring, and a blank cover to match. Plastic boxes and metal boxes both come in new-work and old-work versions.
  • Cable clamps or connectors, unless the box has them built in.
  • Wire nuts. Twist-on wire nuts or push-in connectors sized for the wire gauge and the number of wires you are joining. The package lists the combinations.
  • Tools. A non-contact voltage tester, wire strippers, a screwdriver, a utility knife and a drill for mounting the box.
  • For an old-work box. A stud finder, a level, a drywall saw and the box's template if it has one.
  • For a metal box. A green ground screw and a short bare copper pigtail.

Have all the materials on hand, then switch the circuit off and keep the power off until the installation is finished.

Which electrical box do you need: new-work or old-work, metal or plastic?

The first choice depends on whether the wall or ceiling is open or already finished.

FeatureNew-work boxOld-work box
Where it goesOpen framing, before the drywall goes upAn existing wall or ceiling
How it is fastenedNailed or screwed to a stud or joist, or hung on a bracketClamped to the drywall by wings or tabs that its screws pull tight
Where its front endsAt the finished surface, set by the depth marks many boxes haveIts flange sits on the wall surface
When to use itNew construction, or a renovation with the walls openAdding a box without opening up the wall

Is a metal box or a plastic electrical box better?

Plastic boxes are common in homes wired with plastic-sheathed cable. Plastic doesn't conduct electricity the way metal does, so the ground wires are joined to each other and to any device, not to the box. Many plastic junction boxes have internal clamps or push-in tabs that secure the cable.

A metal box is tougher and is the usual choice where the wiring runs in metal conduit or armored cable. Metal boxes take cable clamps or connectors in their knockouts. A metal junction box must be grounded, so the ground wires attach to it through a green ground screw. Whichever you choose, check that the box suits its location: outdoor, damp and wet locations need boxes and covers made for them.

How many wires can a junction box hold?

It depends on the box's volume. The electrical code counts every conductor, device and clamp inside, and the ground wires, against the volume of the box, which many boxes have marked inside. An overfilled box is hard to close without nicking insulation or loosening a splice. Before you add cables to an existing box, have your electrician or inspector check its fill, and choose a box with more space when in doubt.

Is a fixture box different from a junction box?

A junction box only holds splices under a blank plate. A fixture box also lets you attach and secure a light, and a box for a ceiling fan must be one its maker marks as suitable for fan support. Follow the manufacturer's instructions for the installation of each electrical junction box and for what it can hold.

How do you install a junction box in an open wall or ceiling?

With the framing exposed, use a new-work box. This is the simplest junction box installation, and the time to plan it is before the drywall goes up.

  1. Choose the spot. Put the box where it will stay reachable once the wall or ceiling is closed: facing the room, or behind a planned access panel. Keep it clear of pipes and ducts.
  2. Attach the box. Mount it on the side of a stud or joist with nails or screws, or hang it on a bracket between wall studs, so it is mounted securely and can't shift. Set its front edge to end at the finished surface; many new-work boxes have depth marks for common drywall thicknesses.
  3. Run the cable. Drill through the studs near their middle, or protect the cable with a steel plate where it passes close to an edge where fasteners could reach it. Secure it to the framing as your local code requires.
  4. Bring the cable in. Remove a knockout or open a clamp, push the cable in until its outer sheathing passes the clamp, and tighten the clamp to secure it. Leave enough free conductor in the box to work with.
  5. Leave it open for inspection. If your job has a permit, the inspector usually needs to see the wiring before the drywall goes up.
A round blue plastic ceiling box nailed to a wooden joist in an unfinished basement ceiling, with a white sheathed cable stapled along the joist and entering the box
Before a ceiling goes up, decide how each box on the joists will stay reachable: at the surface under a blank plate, or behind an access panel.

How do you install a junction box in a finished wall?

Installing a junction box in a finished wall uses an old-work box, which grips the drywall instead of a stud. Plan the cable route first, because getting the cable to the hole is usually the hardest part of the installation.

  1. Find a clear cavity. Locate the wall studs with a stud finder and pick a spot between them. With the power off, cut a small inspection hole and check inside with a flashlight for pipes, ducts, blocking or other cables.
  2. Mark the outline. Hold the box or its template on the wall surface, level it, and trace around the body, not the flange.
  3. Cut the opening. Cut on the line with a drywall saw, keeping the hole tight so the flange hides its edges.
  4. Fish the cable. Pull the cable through the cavity to the hole, then feed it through the box's clamp or knockout so the sheathing passes into the box.
  5. Set the box. Push it in until the flange sits on the drywall, then tighten the mounting screws with a screwdriver. As each screw pulls its wing tight against the back of the drywall, the box locks in place. Stop when it is firm, because overtightening can crack the drywall or the box.

Plaster walls are thicker and crack more easily. Score the line before you cut, and check that the box's clamps reach behind the plaster.

A rectangular hole cut along a pencil outline in a painted drywall wall, with a small drywall saw and a blue plastic electrical box on a wooden stool below
Cut between the studs, on a line traced around the body of the box, so its flange hides the edges of the hole.

How do you add a junction box to an existing circuit?

Run the new cable from a box that has room for it, such as a receptacle, a switch or another junction box, or splice into the run inside a new box. Have a licensed electrician confirm the circuit can take the extra load before you install anything. The same goes for a cable that is too short to reach: the splice goes in a box, never loose in the wall.

How do you connect the wires and ground wires?

If you are joining two cables, each usually brings in a black hot wire, a white neutral and a bare copper ground.

  1. Strip the cable. Slit and remove the outer sheathing inside the box without nicking the insulation on the conductors.
  2. Strip each conductor. Use wire strippers set to the wire gauge, and strip the length the connector package shows.
  3. Join the ground wires first. Twist the bare copper grounds together under a connector. In a metal box, add a short pigtail, attach it to the box's green ground screw and tighten it.
  4. Join the neutrals. Connect white to white.
  5. Join the hot wires. Connect the black hot wires together, and red to red if the cable has one. Turn each wire nut clockwise to tighten it, then pull on each wire to check it is secure.
  6. Fold and close. Fold the conductors neatly into the box, grounds at the back, and fit the blank plate. Then restore power at the circuit breaker and test the circuit.

If you find aluminum wiring, or wires with brittle cloth insulation, stop and call an electrician.

An open gray metal junction box on a wooden stud with two white sheathed cables entering it, the black wires joined under one twist-on connector, the white wires under another and the bare copper grounds twisted together
Like colors go together: black to black and white to white. In a metal box, the joined grounds also go to the green screw.

Does an electrical junction box have to stay accessible after the wall is closed?

Yes. It can sit inside a wall or ceiling, but you must be able to reach it and open it without cutting anything, and it needs an accessible cover: a blank plate, a device or a light fixture.

In the United States that rule is NEC Section 314.29 (NFPA 70, 2023 edition, as revised by TIA 23-10): every box you install has to leave the wiring inside it accessible, and a removable cover that keeps that access counts. In Canada, ask your provincial electrical inspector how your code treats a box behind drywall.

When a box will end up behind a ceiling or wall you are closing, put an access panel or door in front of it, with space to take the box's plate off and work with both hands:

  • The PAD0808 hinged door has a 6.35 × 6.35 in service opening, which is also its cut-out, with rounded corners and a 1:1 template on the product page. The frame screws on over the cut-out, and the screws come with the door.
  • The PAD0606 has a 4.35 × 4.35 in service opening, enough only for a small box.
  • SAP0808 spring-loaded panel: fits 6 × 6 to 8 × 8 in openings, overall 10 × 10 in that comes out completely.

Our panels and doors are plastic and are not fire-rated, so ask your building department before you cut into a fire-rated wall or ceiling. The electrical access panels page lists every model with its opening, and can you drywall over a junction box? covers a box that is already buried.

What are the common mistakes in junction box installation?

Most common problems trace back to one of these:

  • Burying the box. Drywall or paneling over an electrical box breaks the accessibility rule, and the next repair starts with a saw.
  • Overfilling it. Too many wires for the box's volume make splices hard to fold in and easy to loosen.
  • Leaving cable unclamped. Cable clamps secure each cable so it can't pull loose or rub on a sharp edge.
  • Skipping the ground. Every ground wire has to be joined, and a metal box grounded through its screw.
  • Using the wrong wire gauge. New cable must be the gauge the circuit breaker calls for; a thinner wire can overheat.
  • Splicing outside a box. Every splice belongs in an approved enclosure with its cover on.
  • Setting the box too deep. If its front edge ends behind the wall surface, ask an electrician about an extension ring.
  • Loose connections. Flickering lights or a warm plate are warning signs. Turn the power off and have the box checked.

Once the installation is done, plan the access.

Measure before you order: our guide on how to measure for an access panel shows how, and the access panel size chart compares every opening and cover. How to install an access panel in drywall covers fitting it.

Questions

Do I need an electrician to install a junction box?

It depends on where you live. Many US jurisdictions let homeowners wire a home they own and live in, with a permit; others require a licensed electrician. In Canada the rules differ by province. Ask your local building department or electrical inspector, and hire a licensed electrician where your area requires one.

Can you put an electrical junction box inside a wall?

Yes, as long as it stays accessible. Its front must end at the wall surface under a removable cover, or sit behind an access panel or door you can open. NEC 314.29 requires the wiring in boxes to stay accessible; in Canada, ask your provincial electrical inspector how your code treats it.

Does a junction box need a cover?

Yes. Once the work is done, every junction box needs one: a blank plate, a device plate or a light fixture. It keeps fingers away from the splices and keeps heat or sparks from a failing connection inside the box.

How many wires can go in a junction box?

It depends on the size of the box and what goes in it. The electrical code counts each conductor, device and clamp, and the ground wires, against the box's volume, which many boxes have marked inside. If in doubt, use a bigger box and ask your electrician or inspector to check the fill.

About the author

Buy Access Panels Team, Product and sizing team. We check every dimension, pack count and barcode against the product record before it is published, and we answer sizing questions by email and phone.