I'm replacing knob-and-tube wiring, and plan to add blown-in attic insulation afterward. I figure it would be safer to run NM wire on the underside of the attic rafters than to bury it in insulation, where they might be stepped on or tripped over. I can't find anything in NEC 320.23 regarding rafters. Is this allowed?

Further, I figure junction boxes would be considered accessible on the rafters, since they won't be concealed under insulation. Is this allowed? Do all j-boxes in the attic need to be accessible through the ceiling?

The attic is accessible via access hole.


Edit 1: Here is a sketch of what I have in mind.cable on rafter

  • Maybe my answer was not clear but it looks like you plan to screw the box to the rafter face not the side, this will provide the clearance, the wires that are running parallel to the rafter still require 1-1/4” from the face of the 2x and 1.5” from the roof decking per 300.3.4 A & E
    – Ed Beal
    Dec 17, 2019 at 14:27

2 Answers 2


Junction boxes on rafters are fine but make sure there's at least 1.5" clearance from the back of the junction box to the outside edge of the rafter, since roof sheathing, properly installed, will be nailed with 1.5" penetration into the rafter and cables enter the junction box right at the back. My inspector called out a junction box too close to the sheathing and it had to be moved on a recent rewire.

FWIW at least here, junction boxes under insulation are still considered accessible as long as the insulation can be removed (you can't spray foam over a junction box cover).

  • 1
    I nail and screw j boxes on rat runs and the top of rafters all the time the requirement for the wires they cannot be within 1-1/4” of the bottom face of the rafter, I am not sure where the 1-1/2” clearance came as that is not in the code.
    – Ed Beal
    Dec 16, 2019 at 20:11
  • The 1-1/2" puzzled me too.
    – JACK
    Dec 16, 2019 at 21:15
  • Why can't cables be within 1-1/4" of the bottom face of the boards holding up the roof, where nails would be coming from the top? I understand this precaution for the ceiling joists, but not the rafters. Dec 16, 2019 at 21:34
  • Ok I re read your answer and think your talking about the wiring & or box being within 1-1/2” of the decking , so the box or wiring was on the side of the rafter not on the face. @zeiebelspaetzle I work in the USA and most of it is governed by the national electric code. NM wiring methods have been required to be set back from the face of the stud by 1-1/4” or have a nail plate for at least a 1/2 century, per NEC 300.4.A.1. The roof decking is in E of the same article.
    – Ed Beal
    Dec 17, 2019 at 14:36
  • Sorry for not being clear and missing a citation I was just remembering from an electrical inspector call-out on a project at my house. It appears to agree with NEC 300.4.E and is for repairs or new roofing layers that may have long fasteners. Frankly I'm not sure how the math adds up. If someone puts in 15/32" sheathing, a 8D nail will go 2" past the inside face of the plywood. But that's the code. In my house with 2x4 rafters it's hard to meet. You'd have to use a very shallow (<2" deep) junction box or nail a standard box pretty far off from the standard 1/2" offset to meet the requirement.
    – Steven
    Dec 18, 2019 at 0:45

The j boxes need to be accessible if you can get in the attic even with a ladder they are accessible. Nailed or screwed down to the rafters is fine I like to run rat boards when traveling perpendicularly to the rafters that way they are supported if stepped on. Running parallel I staple them to the side 1-1/4” down the side. The insulation won’t be a problem. Note a rat board can be a strip of plywood nailed to the rafters or even 2x4’ rat boards provide a good surface to staple the wires and prevent damage if they are stepped on between rafters.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.