A good portion of the answers and discussion on this site references "code".

What does a DIY-er need to know about code as it relates to project in their own home? Most of what I can find online either refers to commercial projects or third-party projects.

Also, which code applies? For example, I live in Fairfax County, Virginia, in the USA. It would seem that there are at least 3 levels of code that might apply:


Vebjorn explains it pretty well. Codes are generally set at a local level (state, county, or city) but localities don't usually write their own codes, they usually just adopt a particular year version of a national code (e.g. the National Electric Code). They make their own ammends to those codes as well though.

Technically everybody is subject to whatever codes are adopted by their locality, but in reality homeowners can get away with pretty much anything they want on their own home. Of course following the codes is recommended for safety reasons and to prevent issues that may come up during an inspection at resale.

As an interesting legal side-note to this, many of the national codes are actually copyrighted works. Because of this, you actually have to pay to buy a copy of the law in order to know what the law is. I believe that this technically violates the constitution as laws cannot be copyrighted, but most localities skirt that by having a copy of the code book on hand that you can stop by and read.

  • Codes are in place for safety, and should not be ignored just because you can possibly "get away" with it. Building a deck below code could cause injury to yourself and others, shoddy electrical can cause a fire.
    – Tester101
    Aug 3 '10 at 15:58
  • 3
    @Tester101 - Just stating a fact, but if that were the case, everything done before 2010 would be unsafe. The codes change constantly but buildings do not. Aug 3 '10 at 17:15
  • Codes do change, and all new work should be up to the new standards. A lot of things done before 2010 are unsafe, and I'm sure most things we are doing now will be made safer by better materials/standards. I'm not saying everything has to be updated with code, but work should never be done below code.
    – Tester101
    Aug 3 '10 at 19:02
  • 1
    @TEster101: The codes here tell me I can't do Oasis Design-style "radical greywater" + Joseph Jenkins "Humanure" toilets. Done right, this is better for the ecosystem and way cheaper than conventional systems. Besides safety, major factors in codes include the willingness of builders to implement those codes, bureaucracy's unwillingness to change. They are also focused on controlling professional builders who have no long-term interest in the success of the home, unlike the owner building her own home.
    – Jay Bazuzi
    Dec 14 '10 at 19:21
  • 1
    Once adopted as law, the text of the adopted version is no longer copyrighted. You can find recent code books in PDF format at bulk.resource.org/codes.gov. The PDFs can be large enough to make your viewer unhappy; I will print out 100-page runs to another PDF and view that, which I fine scrolls far better in my viewer. Jul 15 '12 at 18:18

You need to contact your local building department. In the U.S., most of the residential building regulations exist at the state level, but in many states the codes can be amended by counties and even individual towns.

The International Residential Code and its competitors are "model codes." States often adopt model codes (with local modifications) to avoid the cost and hassle of writing their own codes from scratch, and also because it is beneficial for codes to be harmonized so that the same building materials can be used in different locations.


In Washington State (and most, if not all other states)

Any homeowner with the proper permit(s) can perform work on their home - but the work is required to be done to the applicable code, inspected and signed off, just like a professional contractor. Just because you're DIY doesn't mean you get a break from being code compliant.

So when you pull a permit, the work you do is required to be compliant to the spec at the time. e.g. electrical work permitted today is generally bound to the 2008 National Electric Code (aka NFPA 70). Work I did on my house in 1999 is compliant to the 1999 NEC, but if my permit says I went and made alterations to that work done 10+ years ago, I would still have to make any upgrades to meet the 2008 spec.

The difficult part is knowing what or who is the governing authority or specification regarding the work you're doing. Calling your county/city building inspector should get you the right answers when there are situations where different code bodies offer ambiguous or conflicting information.

Also just visiting the website for your city/county code enforcement office (mine does this) will have guidance on what work requires permitting and what doesn't require a permit.

  • "Just because you're DIY doesn't mean you get a break from being code compliant." Nearly always true, but one exception is for low-voltage wiring, like Ethernet. A homeowner in WA can install it without a permit, but a contractor has to have a permit.
    – Jay Bazuzi
    Nov 8 '10 at 5:13

In the UK, "code" is the Buildings Regulations, available from here.

In practice there's different levels of assessment required roughly corresponding to risk. For instance, work on gas installations and some electrical work must be performed by a qualified engineer. Similarly, while anyone can do structural work it needs to be inspected afterwards by the Building Control Officer of the local council.

These regulations have teeth: not only legally, but it can be difficult or impossible to sell a house that has structural defects to anyone that needs a mortgage. (I had to have an installation of an RSJ inspected thirty years after installation by a previous owner when I sold a flat in Brighton.)

Different more strict regulations apply to properties that are "listed" (i.e. considered of regional or national historic importance) or in a conservation district. Grade 1 listed buildings need to have permission granted by the council if you want to paint an interior wall, for example.

See also the question on buildings regs versus planning permission, here.


Working to code and working under a permit do not have to be related. I always advocate doing work that meets or exceeds code, but many things in your own home do not require permits. However, most cities are not going to turn you down if you offer to give them money for their permission to work on your own home.

Home Owners Associations can also have a say in what you can do to your home.

Even if work is done to current code at the time, if code changes you'll usually have to include modifying a building to meet the new current code in any request for a work permit. There are still lots of buildings out there which need work or repair, but aren't getting them because code has changed. Accessibility features (ramps, elevators) are a common sticking point in commercial buildings.


Here are some reasons that you should follow the applicable codes, even if you could "get away with" not following them:

  • Safety: Codes are written for a reason. They address real problems, and ignoring them can cause real issues.

  • Liability: If someone visiting you property gets hurt because you didn't follow the codes, there is a big liability issue there, possibly even criminal liability if gross negligence can be proven.

  • Resale: If work is not done to code, you may not be able to resell the property.

  • Future work: If you have unrelated work do in the future, you may not be able to get the work approved if other parts are not up to code.

On a related not, work is supposed to conform to the code at the time that it was done. If the code changes in the future, you do not have to redo anything. However, if major remodeling is done you may have to bring everything up to the current code.

  • "If the code changes in the future, you do not have to redo anything" - This is usually but not necessarily true. GFCI outlets in kitchens and bathrooms are a good example (in my locality anyways) Aug 3 '10 at 18:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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