What “code” applies to projects that I do in the own home

building-regulations

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:

Best Answer

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.