Fence RegulationsSourced to the codeBrowse states
State law

Fence laws in Maryland

What Maryland statutes and statewide codes say about fences, one topic at a time, with the section number and a link to the document behind every line.

Fence laws in Maryland, question by question

The short version

Who pays on the line
Maryland has no state rule splitting the cost of a fence on the line.
How tall
Maryland sets no maximum fence height. The chapters that were read are listed below. Cities and counties decide this one.
Permits
Maryland adopts the 2021 International Building Code, the 2021 International Residential Code for one and two family homes, and the 2021 International Energy Conservation Code as the code for the whole state.
Pool barriers
Maryland has statewide pool and spa standards that adopt the 2024 International Swimming Pool and Spa Code.
Spite fences
Maryland has no spite fence statute. The chapters that were read are listed below. Cities and counties decide this one.
Measured from what
Maryland leaves the measuring rule to the legislative body of each county and municipal corporation.
Corner lots
Maryland keeps this short. It reaches a State highway, where the State Highway Administration has not issued a permit only.
Retaining walls
Maryland leaves retaining walls to the 2021 International Residential Code and the 2021 International Building Code. It reaches one and two family homes under the International Residential Code, and other buildings under the International Building Code only.
Materials
Maryland says what a battery charged fence security system has to look like, which is an electric fence wired into a burglar alarm. The figure is 5 feet, for minimum height of the nonelectric fence or wall in front of a battery-charged fence security system. It reaches battery charged fence security systems on land that is not zoned for homes only only.
Livestock
Maryland leaves the lawful fence specification to each county.

Who owns the fence between two properties in Maryland?

Compare fences on the property line across all 50 states

Maryland answers this in its own law. The words that do it are quoted below.

Maryland has no state rule splitting the cost of a fence on the line. It gives the whole subject to the counties. A county may set rules for how a fence is built and kept up, set a way for neighbors to enforce their rights over a fence, and let an owner who is not the one at fault put a lien on the property for repairs. Neither the property article nor the farming article mentions fences at all.

A county may: (1) regulate the construction and maintenance of fences; (2) provide for a procedure to enforce the rights of parties with reference to a fence; and (3) provide for a lien for repairs to a fence made by an owner who is not in default.

Md. Code, Local Gov’t § 10-318Maryland General Assembly · Read 13 September 2026

How tall can a fence be in Maryland?

Compare fence height across all 50 states

Maryland law has no rule about this. The chapters that were read are listed below. Cities and counties decide it instead.

Maryland sets no limit on how tall a fence at a house can be, and its own laws assume the limit comes from somewhere else. The Land Use Article lets a town pass a local law allowing a fence taller than the height state, regional or county zoning would otherwise require, which only makes sense if those local rules are where the limit lives. The Local Government Article separately gives counties power over how a fence is built. Height in Maryland is county and town zoning.

Documents read before writing that:

Do I need a permit for a fence in Maryland?

Compare permits across all 50 states

Maryland answers this in its own law. The words that do it are quoted below.

Maryland adopts the 2021 International Building Code, the 2021 International Residential Code for one and two family homes, and the 2021 International Energy Conservation Code as the code for the whole state. Maryland did not change the list of work that needs no permit, so the model code list applies as written. That list is model code text and is not published on a Maryland state site, so no fence height figure is quoted here.

(1) 2021 International Building Code (International Code Council); (2) 2021 International Residential Code for One- and Two-Family Dwellings (International Code Council); and (3) 2021 International Energy Conservation Code (International Code Council).

COMAR 09.12.51.04Maryland Department of Labor, Division of Labor and Industry · Read 13 September 2026

Pool fence requirements in Maryland

Compare pool barriers across all 50 states

Maryland answers this in its own law. The words that do it are quoted below.

Maryland has statewide pool and spa standards that adopt the 2024 International Swimming Pool and Spa Code. They apply to a pool whose permit application reached the local office on or after December 31, 2023. Maryland wrote its own barrier heights only for the public pool classes, and left the barrier rules for every other pool as the model code wrote them. So the height for a pool at a house lives in that model code and not in Maryland text.

The 2024 International Swimming Pool and Spa Code (ISPSC), International Code Council, is incorporated by reference.

COMAR 09.12.56.03Maryland Department of Labor, Division of Labor and Industry · Read 13 September 2026

Spite fence laws in Maryland

Compare spite fences across all 50 states

Maryland law has no rule about this. The chapters that were read are listed below. Cities and counties decide it instead.

Maryland has no spite fence law. The property, farming, local government and land use articles were all searched, and none of them has a rule about a fence raised out of spite, or a height that triggers one. The only fence powers in Maryland law are the ones given to counties and towns, so a limit on a spite fence in Maryland is a local rule.

Documents read before writing that:

How fence height is measured in Maryland

Compare how height is measured across all 50 states

Maryland does not set this. It leaves it to the legislative body of each county and municipal corporation.

Maryland gives fence height to local government twice and never says what it is measured from. The Land Use Article lets a legislative body set the height, number of stories and size of buildings and other structures. Another section lets a town inside the regional district pass a law allowing a fence taller than the limit state, regional or county zoning would otherwise set, which treats that height as a number somebody else already wrote. Neither section says whether the number is read from natural ground or from a finished yard.

To promote the health, safety, and general welfare of the community, a legislative body may regulate: (1) the height, number of stories, and size of buildings and other structures;

Md. Code, Land Use 4-102Maryland General Assembly · Read 13 September 2026

The code hands this to the legislative body of each county and municipal corporation, which is not published in the code itself.

Fence rules for corner lots in Maryland

Compare corner visibility across all 50 states

Maryland answers this in its own law. The words that do it are quoted below.

Maryland keeps this short. State law says a person may not put anything blocking a state highway, or any improvement, on that highway unless the State Highway Administration has issued a permit for it. A fence set onto the state road strip needs that permit. There is no sight distance figure and no corner triangle in the subtitle, and the height and placement of a fence on a private lot is left to county and town zoning, so the triangle in Maryland is written locally.

Place any obstruction or improvement on any State highway.

Md. Code, Transp. 8-646Maryland General Assembly · Read 13 September 2026

Retaining wall rules in Maryland

Compare retaining walls across all 50 states

Maryland does not set this. It leaves it to the 2021 International Residential Code and the 2021 International Building Code.

Maryland adopts three model codes as its own, among them the 2021 International Residential Code for one and two family homes. Maryland then lists its changes to those codes, and that list never mentions a wall that holds back dirt. So the rule for such a wall comes from the model code, and Maryland prints no number of its own. The same chapter puts running and enforcing the standards on each local office.

A. In this chapter, the following documents are incorporated by reference: (1) 2021 International Building Code (International Code Council); (2) 2021 International Residential Code for One- and Two-Family Dwellings (International Code Council); and (3) 2021 International Energy Conservation Code (International Code Council).

COMAR 09.12.51.04Maryland Department of Labor, Division of Labor and Industry · Read 13 September 2026

The code hands this to the 2021 International Residential Code and the 2021 International Building Code, which is not published in the code itself.

Fence materials allowed in Maryland

Compare materials across all 50 states

Maryland answers this in its own law. The words that do it are quoted below.

Maryland says what a battery charged fence security system has to look like, which is an electric fence wired into a burglar alarm. It runs on a battery of no more than 12 volts and stands behind a fence or wall at least 5 feet tall that carries no charge. It sits on land not zoned for homes only, stops at 10 feet, and carries warning signs every 30 feet. A local government may inspect one and fine an owner up to $500 for a fence that does not match, but it may not ban one or add its own rules for putting one up. Deer fencing and livestock fencing are left out of the section.

(3) is located: (i) behind a nonelectric perimeter fence or wall that is at least 5 feet tall; and (ii) on property that is not zoned as residential use only; (4) is not taller than 10 feet or 2 feet taller than the height of the perimeter fence or wall, whichever is taller; and

Md. Code, Bus. Reg. 19-902Maryland General Assembly · Read 13 September 2026

5 ftminimum height of the nonelectric fence or wall in front of a battery-charged fence security system

Livestock and boundary fence law in Maryland

Compare agricultural fencing across all 50 states

Maryland does not set this. It leaves it to each county.

Maryland writes no statewide rule for how a farm fence is built. It gives each county three powers instead. A county can set the rules for building and keeping up a fence. It can set a way for neighbors to enforce their fence rights against each other. And it can let an owner who repairs a shared fence put a lien on the property for the cost. So the height, the wire count and the post spacing come from county law.

A county may: (1) regulate the construction and maintenance of fences; (2) provide for a procedure to enforce the rights of parties with reference to a fence; and (3) provide for a lien for repairs to a fence made by an owner who is not in default.

Md. Code, Local Gov't 10-318Maryland General Assembly · Read 13 September 2026

The code hands this to each county, which is not published in the code itself.

Cities in Maryland

5 cities with their own fence rules read from the city’s own code. Where a city says nothing on a topic, the state answer above is what applies.

Documents behind this page

7 documents, each read on the date shown. Nothing on this page rests on a summary of one.

  1. Maryland General AssemblyAnnotated Code of Maryland, Local Government Article, Section 10-318Md. Code, Local Gov’t § 10-318 · Read 13 September 2026
  2. Maryland General AssemblyAnnotated Code of Maryland, Land Use Article, Section 25-303Md. Code, Land Use § 25-303 · Read 13 September 2026
  3. Maryland Department of Labor, Division of Labor and IndustryCode of Maryland Regulations, Title 09, Subtitle 12, Chapter 51, Maryland Building Performance Standards, Regulation .04 Incorporation by ReferenceCOMAR 09.12.51.04 · Read 13 September 2026
  4. Maryland Department of Labor, Division of Labor and IndustryCode of Maryland Regulations, Title 09, Subtitle 12, Chapter 56, Maryland Swimming Pool and Spa Standards, Regulation .03 Incorporation by ReferenceCOMAR 09.12.56.03 · Read 13 September 2026
  5. Maryland General AssemblyAnnotated Code of Maryland, Land Use Article, Section 4-102Md. Code, Land Use 4-102 · Read 13 September 2026
  6. Maryland General AssemblyAnnotated Code of Maryland, Transportation Article, Title 8, Subtitle 6, Section 8-646, Permit required for work on highwayMd. Code, Transp. 8-646 · Read 13 September 2026
  7. Maryland General AssemblyAnnotated Code of Maryland, Business Regulation Article, Section 19-902Md. Code, Bus. Reg. 19-902 · Read 13 September 2026

What this page does not cover

Everything above is state law. Fence height, setback, corner visibility and materials are set by city and county ordinance in almost every state, and a local rule can be far stricter than the statewide default. A parcel can also carry an easement, an overlay district, a fire hazard zone or a recorded HOA restriction, none of which appear in a statute.

This is general information drawn from published government documents. It is not legal advice, statutes are amended, and the date beside each finding is the date the document was read. How findings are made · What the terms mean