# Building code

A building code (also building control or building regulations) is a set of rules that specify the standards for construction objects such as buildings and non-building structures. Buildings must conform to the code to obtain planning permission, usually from a local council. The main purpose of building codes is to protect public health, safety and general welfare as they relate to the construction and occupancy of buildings and structures — for example, the building codes in many countries require engineers to consider the effects of soil liquefaction in the design of new buildings. The building code becomes law of a particular jurisdiction when formally enacted by the appropriate governmental or private authority.
Building codes are generally intended to be applied by architects, engineers, interior designers, constructors and regulators but are also used for various purposes by safety inspectors, environmental scientists, real estate developers, subcontractors, manufacturers of building products and materials, insurance companies, facility managers, tenants, and others. Codes regulate the design and construction of structures where adopted into law.
Examples of building codes began in ancient times. In the USA the main codes are the International Building Code or International Residential Code [IBC/IRC], electrical codes and plumbing, mechanical codes. Fifty states and the District of Columbia have adopted the I-Codes at the state or jurisdictional level. In Canada, national model codes are published by the National Research Council of Canada. In the United Kingdom, compliance with Building Regulations is monitored by building control bodies, either Approved Inspectors or Local Authority Building Control departments. Building Control regularisation charges apply in case work is undertaken which should have had been inspected at the time of the work if this was not done.

## Types

The practice of developing, approving, and enforcing building codes varies considerably among nations. In some countries building codes are developed by the government agencies or quasi-governmental standards organizations and then enforced across the country by the central government. Such codes are known as the national building codes (in a sense they enjoy a mandatory nationwide application).
In other countries, where the power of regulating construction and fire safety is vested in local authorities, a system of model building codes is used. Model building codes have no legal status unless adopted or adapted by an authority having jurisdiction. The developers of model codes urge public authorities to reference model codes in their laws, ordinances, regulations, and administrative orders. When referenced in any of these legal instruments, a particular model code becomes law. This practice is known as 'adoption by reference'. When an adopting authority decides to delete, add, or revise any portions of the model code adopted, it is usually required by the model code developer to follow a formal adoption procedure in which those modifications can be documented for legal purposes.
There are instances when some local jurisdictions choose to develop their own building codes. At some point in time all major cities in the United States had their own building codes. However, due to ever increasing complexity and cost of developing building regulations, virtually all municipalities in the country have chosen to adopt model codes instead. For example, in 2008 New York City abandoned its proprietary 1968 New York City Building Code in favor of a customized version of the International Building Code. The City of Chicago remains the only municipality in America that continues to use a building code the city developed on its own as part of the Municipal Code of Chicago.
In Europe, the Eurocode: Basis of structural design, is a pan-European building code that has superseded the older national building codes. Each country now has National Annexes to localize the contents of the Eurocodes.
Similarly, in India, each municipality and urban development authority has its own building code, which is mandatory for all construction within their jurisdiction. All these local building codes are variants of a National Building Code, which serves as model code proving guidelines for regulating building construction activity.

### Scope

The purpose of building codes is to provide minimum standards for safety, health, and general welfare including structural integrity, mechanical integrity (including sanitation, water supply, light, and ventilation), means of egress, fire prevention and control, and energy conservation. Building codes generally include:
* Standards for structure, placement, size, usage, wall assemblies, fenestration size/locations, egress rules, size/location of rooms, foundations, floor assemblies, roof structures/assemblies, energy efficiency, stairs and halls, mechanical, electrical, plumbing, site drainage & storage, appliance, lighting, fixtures standards, occupancy rules, and swimming pool regulations
* Rules regarding parking and traffic impact
* Fire code rules to minimize the risk of a fire and to ensure safe evacuation in the event of such an emergency
* Requirements for earthquake (seismic code), hurricane, flood, and tsunami resistance, especially in disaster prone areas or for very large buildings where a failure would be catastrophic
* Requirements for specific building uses (for example, storage of flammable substances, or housing a large number of people)
* Energy provisions and consumption
* Grandfather clauses: Unless the building is being renovated, the building code usually does not apply to existing buildings.
* Specifications on components
* Allowable installation methodologies
* Minimum and maximum room ceiling heights, exit sizes and location
* Qualification of individuals or corporations doing the work
* For high structures, anti-collision markers for the benefit of aircraft
Building codes are generally separate from zoning ordinances, but exterior restrictions (such as setbacks) may fall into either category.
Designers use building code standards out of substantial reference books during design. Building departments review plans submitted to them before construction, issue permits [or not] and inspectors verify compliance to these standards at the site during construction.
There are often additional codes or sections of the same building code that have more specific requirements that apply to dwellings or places of business and special construction objects such as canopies, signs, pedestrian walkways, parking lots, and radio and television antennas.

## Criticism

Building codes have been criticized for contributing to housing crisis and increasing the cost of new housing to some extent, including through conflicting code between different administrators. Proposed improvements include regular review and cost-benefit analysis of building codes, promotion of low-cost construction materials and building codes suitable to mass production, reducing bureaucracy, and promoting transparency.

## History
### Antiquity

Building codes have a long history. The earliest known written building code is included in the Code of Hammurabi, which dates from circa 1772 BC.
The book of Deuteronomy in the Hebrew Bible stipulated that parapets must be constructed on all houses to prevent people from falling off.
In the Chinese book of rites it mentions that ancestral temples and houses should be a certain standard length in ancient China they measured land in the chu or well field system so it was important to be precise though most of the actual lengths are lost or obscure.
In ancient Japan a certain official destroyed a courtiers house because the size was above his rank.

### Modern era
#### France

In Paris, under the reconstruction of much of the city under the Second Empire (1852–70), great blocks of apartments were erected and the height of buildings was limited by law to five or six stories at most.

#### United Kingdom

After the Great Fire of London in 1666, which had been able to spread so rapidly through the densely built timber housing of the city, the Rebuilding of London Act 1666 was passed in the same year as the first significant building regulation. Drawn up by Sir Matthew Hale, the act regulated the rebuilding of the city, required housing to have some fire resistance capacity and authorised the City of London Corporation to reopen and widen roads. The Laws of the Indies were passed in the 1680s by the Spanish Crown to regulate the urban planning for colonies throughout Spain's worldwide imperial possessions.
The first systematic national building standard was established with the Metropolitan Buildings Act 1844. Among the provisions, builders were required to give the district surveyor two days' notice before building, regulations regarding the thickness of walls, height of rooms, the materials used in repairs, the dividing of existing buildings and the placing and design of chimneys, fireplaces and drains were to be enforced and streets had to be built to minimum requirements.
The Metropolitan Buildings Office was formed to regulate the construction and use of buildings throughout London. Surveyors were empowered to enforce building regulations, which sought to improve the standard of houses and business premises, and to regulate activities that might threaten public health. In 1855 the assets, powers and responsibilities of the office passed to the Metropolitan Board of Works.

#### United States

The City of Baltimore passed its first building code in 1891. The Great Baltimore Fire occurred in February 1904. Subsequent changes were made that matched other cities. In 1904, a Handbook of the Baltimore City Building Laws was published. It served as the building code for four years. Very soon, a formal building code was drafted and eventually adopted in 1908.
The structural failure of the tank that caused the Great Molasses Flood of 1919 prompted the Boston Building Department to require engineering and architectural calculations be filed and signed. U.S. cities and states soon began requiring sign-off by registered professional engineers for the plans of major buildings.
More recently, the 2015 Berkeley balcony collapse has prompted updates to California's balcony building codes, set for 2025, which include stricter material requirements, enhanced load-bearing standards, and mandatory inspections which known as SB326 and SB721.These laws mandate regular inspections every six years for multifamily buildings. Property owners and HOAs are required to address any structural or waterproofing issues identified during inspections to ensure compliance and safety. Failure to comply can result in fines, increased liability, and legal consequences. The updates aim to prevent tragedies like the Berkeley collapse, which was caused by dry rot and structural failure, by ensuring the long-term safety and durability of elevated structures.

##### Energy codes

The current energy codes of the United States are adopted at the state and municipal levels and are based on the International Energy Conservation Code (IECC). Previously, they were based on the Model Energy Code (MEC). As of March 2017, the following residential codes have been partially or fully adopted by states:
* 2015 IECC or equivalent (California, Illinois, Maryland, Massachusetts, Michigan, Pennsylvania, New Jersey, New York, Vermont, Washington)
* 2012 IECC or equivalent (Alabama, Connecticut, Delaware, District of Columbia, Florida, Iowa, Minnesota, Nevada, Rhode Island, Texas)
* 2009 IECC or equivalent (Arkansas, Georgia, Idaho, Indiana, Kentucky, Louisiana, Montana, Nebraska, New Hampshire, New Mexico, North Carolina, Ohio, Oklahoma, Oregon, South Carolina, Tennessee, Virginia, West Virginia, Wisconsin)
* 2006 IECC or equivalent (Utah)
* 2006 IECC or no statewide code (Alaska, Arizona, Colorado, Kansas, Maine, Mississippi, Missouri, North Dakota, South Dakota, Wyoming)

### Australia

Australia uses the National Construction Code.