Fence RegulationsSourced to the codeBrowse states
City ordinance

Fence laws in Baltimore, Maryland

What the Baltimore municipal code says about fences, one topic at a time, with the section number and a link to the document behind every line. Where Baltimore sets no rule of its own, the Maryland rule is shown in its place and marked as such.

Fence laws in Baltimore, Maryland, question by question

The short version

Who pays on the line
A fence may be built only on the property of its owner. The figure is 0 feet, for setback stated from a property line, with the fence required to be inside it.
How tall
Baltimore starts low and then makes exceptions, and the answer turns on what the fence encloses and which yard it stands in. The figure is 42 inches, for general maximum height of a fence.
Permits
The section never says in so many words that a fence needs a permit and then assumes one throughout, and the answer turns on what is being built, approved or repaired. The figure is 50 percent, for deterioration at which a nonconforming fence loses its protection.
Pool barriers
Maryland has statewide pool and spa standards that adopt the 2024 International Swimming Pool and Spa Code.
Spite fences
Baltimore has no spite fence statute. The chapters that were read are listed below. Cities and counties decide this one.
Measured from what
Height is measured on the high side, so where two lots meet at different levels the neighbor standing higher sets the number and the owner on the low side gains nothing from the drop. The figure is 2 feet, for depth a masonry fence has to extend into the ground.
Corner lots
Maryland keeps this short. It reaches a State highway, where the State Highway Administration has not issued a permit only.
Retaining walls
Baltimore 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
Razor wire may not be used anywhere in any fence, which is about as flat as a prohibition gets, and the answer turns on the material, the height and the zoning district.
Livestock
Baltimore leaves the lawful fence specification to each county.

Who owns the fence between two properties in Baltimore?

Compare fences on the property line across all 50 states

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

A fence may be built only on the property of its owner. The exception is written carefully: if the owners of adjoining properties agree to build on the line between them they may do so, provided they both submit a written statement of their agreement with the permit application. So a boundary fence in Baltimore is lawful only with two signatures on file, and the agreement goes in at permit time rather than being produced later when somebody complains. No setback distance is stated anywhere in the section, so a fence may come right up to the line on the owner side without anyone agreeing to anything. The zoning code approaches the same ground from the other direction, listing a fence or wall among the things permitted to encroach into a required yard, at three and a half feet in a front or corner-side yard and six feet in a rear or interior-side yard.

A fence may be built only on the property of the owner of the fence. However, if the owners of adjoining property agree to build a fence on the property line between them, they may do so if they both submit, with the application for the permit, a written statement of their agreement.

Section 3118.1City of Baltimore · Read 23 September 2026

0 ftsetback stated from a property line, with the fence required to be inside it

Also on fences on the property line in Baltimore

  • set in state lawMaryland 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. Md. Code, Local Gov’t § 10-318Maryland · Statute

How tall can a fence be in Baltimore?

Compare fence height across all 50 states

Baltimore answers this, but the answer changes depending on what the fence encloses and which yard it stands in.

Baltimore starts low and then makes exceptions. The general rule is that a fence may not exceed forty two inches, measured on the high side, which is one of the lowest baseline fence heights in this project. A fence enclosing a dwelling may go to six feet, but only in a side or rear yard, so the forty two inches is what governs a front yard at a house. A fence enclosing a building used for public or private assembly, an institution, offices, commercial storage or an industrial occupancy may go to eight feet. Anything above eight feet takes the Building Official, who may specially authorize a higher fence for protection around a dangerous place, a highly hazardous operation, an electric security installation or an athletic field, and in similar cases where a high fence is needed for public safety. The zoning code states the same two numbers in its own units.

the height of a fence may not exceed 42 inches (1067 mm), measured on the high side.

Section 3118.2City of Baltimore · Read 23 September 2026

The answer turns on what the fence encloses and which yard it stands in.

any fence generally
Forty two inches. 42 in
a dwelling, side or rear yard
Six feet. 6 ft
assembly, institutional, office or industrial
Eight feet. 8 ft
a dangerous place or an athletic field
More, if the Building Official authorizes it.

Also on fence height in Baltimore

  • no rule, documents checkedMaryland 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. Md. Code, Land Use § 25-303Maryland · Statute

Do I need a permit for a fence in Baltimore?

Compare permits across all 50 states

Baltimore answers this, but the answer changes depending on what is being built, approved or repaired.

The section never says in so many words that a fence needs a permit and then assumes one throughout. A boundary agreement between two neighbors has to be submitted with the application for the permit, which only makes sense if every fence has an application. The Building Official then holds three separate powers over fences: specially authorizing a fence above eight feet for a dangerous place or an athletic field, approving the design and construction of a metal fence, and determining the sufficiency of any fence and the amount and character of repairs needed to make it safe. The nonconforming rule draws a line most codes do not. An old fence that was lawful when built may stay and be repaired at any time, unless it has deteriorated more than fifty percent, at which point it has to come down or be rebuilt to the current code.

All nonconforming fences that have deteriorated more than 50% or beyond repair must be removed or reconstructed in accordance with the requirements of this Code.

Section 3118.6City of Baltimore · Read 23 September 2026

The answer turns on what is being built, approved or repaired.

building a fence
A permit application, and the agreement with it.
over eight feet
The Building Official authorizes it.
an old nonconforming fence
It may stay, and be repaired.
one more than half gone
Remove it or rebuild to code. 50%

Also on permits in Baltimore

  • set in state lawMaryland 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. COMAR 09.12.51.04Maryland · Building code

Pool fence requirements in Baltimore

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.

This one is Maryland law, not Baltimore law. All Maryland findings

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 Baltimore

Compare spite fences across all 50 states

Baltimore 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.

This one is Maryland law, not Baltimore law. All Maryland findings

Documents read before writing that:

How fence height is measured in Baltimore

Compare how height is measured across all 50 states

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

Height is measured on the high side, so where two lots meet at different levels the neighbor standing higher sets the number and the owner on the low side gains nothing from the drop. The second measuring rule handles the other common trick. A fence made of two or more kinds of material may be built, provided every applicable requirement for each material is met, and the total aggregate height of the combination has to be used in deciding the height limit. So a three foot masonry base with a four foot wood panel on top is a seven foot fence, not two separate short ones. What the section never states is a datum for the ground itself, beyond the words high side, and it never addresses a berm. A masonry fence is measured downward too, in a sense, since all masonry fences have to extend at least two feet into the ground.

The total aggregate height of a combination fence must be used in determining the height limitations for that fence.

Section 3118.3.5City of Baltimore · Read 23 September 2026

2 ftdepth a masonry fence has to extend into the ground

Also on how height is measured in Baltimore

  • left to the townMaryland 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. Md. Code, Land Use 4-102Maryland · Zoning code

Fence rules for corner lots in Baltimore

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.

This one is Maryland law, not Baltimore law. All Maryland findings

Place any obstruction or improvement on any State highway.

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

Also on corner visibility in Baltimore

  • no rule, documents checkedBaltimore draws no sight triangle for a fence. Neither the fence section of the building code nor the encroachment table in the zoning code states a leg length, a protected band of height, a datum or an exception for an open fence, and a search of Article 32 for the usual language turns up visibility only in rules about plazas, shopfront windows and antennas. What does the corner job instead is the shape of the height rule. Table 15-601 puts a corner-side yard in the same row as a front yard, holding a fence there to three and a half feet, while a rear or interior-side yard gets six. So on a corner lot both street frontages are held low for their whole length rather than only at the intersection, which is a blunter answer than a triangle and an easier one to apply from a plan. Table 15-601Baltimore · Zoning code

Retaining wall rules in Baltimore

Compare retaining walls across all 50 states

Baltimore 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.

This one is Maryland law, not Baltimore law. All Maryland findings

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 Baltimore

Compare materials across all 50 states

Baltimore answers this, but the answer changes depending on the material, the height and the zoning district.

Razor wire may not be used anywhere in any fence, which is about as flat as a prohibition gets. Barbed wire or other approved retarding material may be placed on top of a fence only where that fence is more than six feet nine inches high, and not even then if it would create a highly hazardous condition. No fence may have projecting sharp points, jagged edges or other projections that could injure a person or an animal touching it, and no fence under three feet six inches may have sharp pickets or vertical pointed objects on top, which protects a child at a low picket fence. An electric security fence is permitted only in a C-3, C-4 or Industrial district, only where it abuts no residentially zoned parcel, and only inside an exterior non-electric barrier fence. Everything else may be built of any material the code permits for an exposed structure.

No fence less than 3 feet 6 inches (1.07 m) high may have any sharp pickets or vertical pointed objects at the top. Barbed wire or other approved retarding material or construction may be placed on the top of any fence that is more than 6 feet 9 inches (2.06 m) high, unless the barbed wire or other retarding material will create a highly hazardous condition.

Section 3118.4.1City of Baltimore · Read 23 September 2026

The answer turns on the material, the height and the zoning district.

razor wire
Nowhere, in any fence.
barbed wire
Only above six feet nine inches.
a low picket fence
No sharp points under three feet six.
an electric security fence
C-3, C-4 or Industrial, never beside housing.

Also on materials in Baltimore

  • set in state lawMaryland 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. Md. Code, Bus. Reg. 19-902Maryland · Statute

Livestock and boundary fence law in Baltimore

Compare agricultural fencing across all 50 states

Baltimore 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.

This one is Maryland law, not Baltimore law. All Maryland findings

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.

Documents behind this page

9 documents, of which 2 were published by Baltimore itself. Each was read on the date shown.

  1. Maryland General AssemblyAnnotated Code of Maryland, Local Government Article, Section 10-318Md. Code, Local Gov’t § 10-318 · Read 13 September 2026
  2. City of BaltimoreBaltimore City Code, Building, Fire, and Related Codes, 2024 Edition, Part II, International Building Code, Chapter 31, Section 3118, FencesSection 3118.1 · Read 23 September 2026
  3. Maryland General AssemblyAnnotated Code of Maryland, Land Use Article, Section 25-303Md. Code, Land Use § 25-303 · Read 13 September 2026
  4. 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
  5. 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
  6. Maryland General AssemblyAnnotated Code of Maryland, Land Use Article, Section 4-102Md. Code, Land Use 4-102 · Read 13 September 2026
  7. 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
  8. City of BaltimoreBaltimore City Code, Article 32, Zoning, Table 15-601, Permitted Encroachments into Required YardsTable 15-601 · Read 23 September 2026
  9. 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

A city ordinance is not the only rule that reaches a fence. The zoning district a parcel sits in can change the height allowed on it, and so can an overlay district, a recorded easement, a fire hazard severity zone or a coastal zone. A homeowner association can be stricter than the city and nothing in the municipal code will say so. None of those appear here.

The rules above are the ones Baltimore publishes, plus the Maryland rules that apply where the city sets none. Fence laws in Maryland has the state layer in full.

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