Maryland Fence Permit Rules: What Homeowners Need to Know

Quick answer

In most Maryland counties, you need a permit to build a fence. Montgomery County requires a permit for all fences. Baltimore County requires one for fences over 42 inches. Prince George's County requires one for fences over 4 feet. Maryland has a mandatory statewide building code, and local jurisdictions enforce it with their own amendments. Check with your county's permitting office before you start.

Maryland at a glance

Building code adopted

2018 International Residential Code (IRC) with Maryland amendments under the Maryland Building Performance Standards (MBPS)

State authority

Maryland Department of Labor — Division of Labor and Industry, Building Codes Administration

Common permit threshold

Most Maryland counties require a permit for residential fences — Montgomery County requires permits for all fences, Baltimore County for fences over 42 inches, and Prince George's County for fences over 4 feet

Did you know?

Maryland is one of the stricter states for fence permitting — Montgomery County requires a permit for every fence installation regardless of height, and even replacing an existing fence requires a new permit unless the original was built with a permit and the replacement is identical in location, height, and type.

Maryland Has a Mandatory Statewide Building Code

Unlike many states, Maryland has a mandatory statewide building code — the Maryland Building Performance Standards (MBPS) — that applies to all private residential and commercial construction. The MBPS is based on the 2018 editions of the International Building Code (IBC), International Residential Code (IRC), and International Energy Conservation Code (IECC), with state modifications. Every local jurisdiction in Maryland is required to adopt and enforce these codes, though each can add local amendments.

For fences, this means there's a statewide floor for construction standards, but the specific permit requirements, height limits, and material rules are still set locally. Maryland's counties — not its cities — are the primary permitting authorities for most of the state. Understanding which county you're in is the critical first step for any fence project.

For a broader look at how fence permit rules work across the country, see our national guide to fence permits.

Maryland Is a County-Driven State

Maryland's governance structure is different from most states. While cities like Baltimore operate independently, much of the state's population lives in unincorporated areas governed primarily by county regulations. Montgomery County, Prince George's County, Baltimore County, Anne Arundel County, and Howard County collectively account for the majority of Maryland's residents.

This matters for fence permits because your county — not your city — is usually the permitting authority. Even if you live in a named community like Bethesda, Silver Spring, or Columbia, your fence permit comes from the county government. Some incorporated cities (like Gaithersburg, Rockville, Hagerstown, and Annapolis) issue their own permits, but they still operate within the framework of the county code.

How Maryland Counties Handle Fence Permits

Maryland is one of the stricter states when it comes to fence permitting. Most counties require a permit for at least some fence construction, and several require one for every fence regardless of height.

Montgomery County: Permit for Everything

Montgomery County has the strictest fence permit rules in the state. A permit is required to install any type of fence, regardless of height. The only exception is replacing an existing fence that was originally installed with a permit — and only if the replacement is the same type, at the same height, in the same location. If the original fence was built without a permit, the replacement needs one.

Height limits in Montgomery County follow the standard pattern: 42 inches (3.5 feet) in front yards, 6 feet in side and rear yards. Corner lots have a special restriction — fences within 15 feet of the intersection of front and side street lines cannot exceed 3 feet above curb level. A sight distance study may be required.

Montgomery County has two requirements worth noting. First, if you're building a fence on the property line, you must submit a letter of approval from the adjacent property owner with your permit application. Second, properties with individual wells and septic systems face additional requirements during the permit process.

Permit turnaround is fast — usually within three days of application.

Baltimore City and Baltimore County

Baltimore City requires a permit for all residential fences. The city limits front-yard fences to 42 inches and side and rear yard fences to 6 feet. Baltimore City has detailed structural requirements — fences must resist a horizontal force of 20 pounds per square foot from any direction. Masonry fences must extend at least 2 feet into the ground.

Baltimore City also has strict rules for prohibited materials. Razor wire is completely banned on residential fences. Barbed wire is only allowed on fences exceeding 6 feet 9 inches in height. No fence less than 3 feet 6 inches tall may have sharp pickets or pointed objects at the top. Electric fences are limited to commercial zones.

Baltimore County requires a permit for fences taller than 42 inches — a lower threshold than most Maryland counties. The county offers an interesting exception: fences in side or rear yards can reach up to 10 feet if you set the fence back from the property line 2 feet horizontally for every 1 foot of height above 6 feet. This means an 8-foot fence would need a 4-foot setback from the property line. Maximum height in the county is 12 feet, with anything taller requiring Building Engineer approval.

Prince George's County

Prince George's County requires a permit for fences taller than 4 feet. Fences at 4 feet or under are exempt from the permit requirement unless the property is in a historical or protected area or is on a corner lot. Properties in the Chesapeake Bay Critical Area (CBCA) overlay require a CBCA approval and permit regardless of fence height. Properties with 100-year floodplain can only build fences in the floodplain with a waiver.

The county requires that all structural rails and posts face inward — the "finished" side of the fence faces outward per CB-4-2016.

Anne Arundel County and Howard County

Anne Arundel County defines a fence as a residential accessory structure, and as such requires a permit. The county allows fences up to 6 feet without a permit for standard situations, but corner lots, waterfront properties, and pool installations all require a permit regardless of height. Within the city limits of Annapolis, a permit is required for all fences.

Howard County requires permits for fences taller than 6 feet. The county follows similar height guidelines to the rest of the state, with additional rules for corner lots involving a clear vision area.

Height Limits Across Maryland

The height framework is remarkably consistent across Maryland's jurisdictions:

Hagerstown adds some helpful exceptions. Residential lots that abut commercial or institutional districts can build side and rear yard fences up to 8 feet. Lots adjoining industrial districts can go up to 10 feet. These exceptions acknowledge that properties bordering non-residential uses often need more screening.

Pool Fence Requirements

Maryland follows the IRC and International Swimming Pool and Spa Code (ISPSC) standards for pool barriers. Key requirements:

A pool fence permit is required in virtually every Maryland jurisdiction. This is separate from the pool construction permit itself. If your existing backyard fence meets the height and safety requirements, it may serve as the pool barrier — but verify with your county's building department that it meets all latch, gate, and gap specifications.

Material Restrictions

Maryland jurisdictions share common material restrictions for residential fences.

Barbed wire faces heavy restrictions across the state. Baltimore City only allows it on fences exceeding 6 feet 9 inches in height. Baltimore County limits it to livestock retention where it doesn't create a public safety hazard. Hagerstown prohibits barbed wire in all residential districts. Most counties follow a similar approach.

Razor wire is prohibited on residential fences in Baltimore City and most other Maryland jurisdictions.

Electric fences are restricted to commercial and industrial zones in Baltimore City. Montgomery County and Prince George's County follow similar rules, generally limiting electric fences to non-residential properties.

Chain link is not universally banned but faces restrictions in front yards in some jurisdictions. Hagerstown prohibits chain link and wire fences in front yards. Many HOAs also prohibit chain link.

Hagerstown's front-yard fence rule is particularly specific: fences must be open construction, with picket spacing at least 1 inch wide or half the width of the picket (whichever is greater). This effectively requires a decorative design — wrought iron, picket, or similar — rather than solid privacy fencing.

Historic Districts and Special Overlay Zones

Maryland has a high concentration of historic districts and overlay zones that add another layer of regulation for fence construction.

Historic districts in Baltimore City, Annapolis, Hagerstown, Frederick, and many other jurisdictions require approval from a Historic District Commission (or similar body) before a fence permit can be issued. This applies regardless of fence height or type. The commission reviews material, design, and placement to ensure the fence is compatible with the historic character of the neighborhood.

Chesapeake Bay Critical Area (CBCA) overlay zones affect properties across the Eastern Shore, Southern Maryland, and portions of the Baltimore and Annapolis metro areas. Properties in the CBCA may face additional restrictions on fence construction to protect the bay's watershed. Prince George's County requires a separate CBCA approval for fences in these zones.

Floodplain restrictions apply in all Maryland counties. Fences within 100-year floodplains may require special permits or waivers. Solid fences in floodplains can redirect water flow and cause damage to neighboring properties, so expect additional scrutiny.

Property Lines and Boundary Fences

Maryland doesn't have a specific statutory framework for boundary fences. Instead, the state relies on common law principles. A fence on a boundary line is considered to belong to both property owners as long as both use the fence and no written agreement says otherwise. However, one homeowner cannot compel a neighbor to contribute to building a new fence.

Montgomery County adds a practical requirement: if you want to install a fence on the property line, you must include a letter of approval from the adjacent property owner with your permit application. This doesn't mean they're agreeing to share costs — it simply means they know about and approve the fence location.

For fences built entirely on your own property (set back from the property line), no neighbor approval is needed. But the permit is still limited to your property as shown on the approved site plan. Any dispute about whether a fence extends into a neighbor's property is a legal matter between the owners — the county won't mediate.

Contractor Licensing

Maryland has a statewide requirement that any contractor performing fence installation must be licensed by the Maryland Home Improvement Commission (MHIC). This applies across all jurisdictions. If a contractor is doing the work, the MHIC license number must appear on the permit application. In Montgomery County, the county strongly suggests that the contractor be listed on the permit as the party responsible for the work.

Homeowners can obtain a permit and build a fence themselves without a license, as long as they're doing the work on their own property.

HOA Prevalence and Rules

Maryland has a high rate of HOA-governed communities, particularly in the suburban counties around Washington, D.C. (Montgomery County, Prince George's County, Howard County) and the Baltimore metro area (Baltimore County, Anne Arundel County, Harford County).

HOA rules in Maryland typically regulate fence type, height, color, and style, and often require architectural committee approval before construction. Gaithersburg's permitting office explicitly notes that fence permits require conformity with the "Architectural Guidelines of the community" — meaning HOA approval must come first.

Maryland does not have state-level protections limiting HOA fence restrictions. Your HOA can be more restrictive than the county code, and their rules are enforceable as contractual obligations.

Consequences of Building Without a Permit

In a state where most jurisdictions require permits, skipping the process carries real risks:

Fence permits in Maryland are generally inexpensive and processed quickly. Montgomery County turns most fence permits around in three days. The cost of getting a permit is minimal compared to the cost of removing and rebuilding a non-compliant fence.

If you're also planning a deck or retaining wall alongside your fence, check the permit requirements for each structure separately. For an overview of all building permit requirements in Maryland — including sheds, pools, and more — see our complete Maryland building permit guide.

City Permit threshold Typical fee Review time
Baltimore Varies Varies Varies
Rockville Varies Varies Varies
Gaithersburg Varies Varies Varies
Hagerstown Varies Varies Varies
Annapolis Varies Varies Varies

City names link to full city-specific guides.

Fence permits in neighboring states:

Ready to build your fence?

Professional fence plans that meet Maryland building code requirements. Permit-ready drawings you can submit with your application.

Get Fence Plans

Frequently asked questions

Does Montgomery County require a permit for all fences?

Yes. Montgomery County requires a permit to install any type of fence, regardless of height. The only exception is replacing an existing fence that was built with a permit — if the replacement fence is the same type, in the same location, and at the same height, no new permit is needed. If the original fence was not installed with a permit, the replacement must have one. Fence permits in Montgomery County are usually issued within three days of application.

What about the Chesapeake Bay Critical Area restrictions?

If your property falls within the Chesapeake Bay Critical Area (CBCA) overlay zone, additional restrictions may apply to fence construction. In Prince George's County, properties in the CBCA require a separate CBCA approval and permit for fence installation regardless of fence height. This overlay exists to protect the bay's watershed and can affect properties that aren't immediately adjacent to the water. Check your county's GIS maps to see if your property is in a CBCA zone.

Does my neighbor have to pay for half the fence in Maryland?

Maryland doesn't have a specific fence statute requiring cost-sharing. Instead, the state follows common law: a fence on a boundary line belongs to both property owners as long as they both use the fence and there isn't a written agreement stating otherwise. However, one homeowner cannot force their neighbor to contribute to building a new fence. If you want to share costs, get a written agreement before construction.

Can I build a spite fence in Maryland?

Maryland does not have a specific spite fence statute, but nuisance law applies. If a neighbor builds a fence primarily to annoy or harm you, you can bring a private nuisance claim. The court applies a balancing test — weighing the adverse effect on your property use against the value of the structure to the fence owner. If the court determines the fence was built with malicious intent and has little practical value, it can order removal and award damages.

Do I need a property survey before building a fence in Maryland?

Maryland doesn't require a survey for most fence permit applications, but several counties strongly recommend it. Montgomery County requires a property plat or site plan showing the proposed fence location. A fence permit in Montgomery County is limited to the applicant's property, and any dispute about whether a fence extends into a neighbor's property is a legal matter between the property owners. For fences built on the property line, Montgomery County requires a letter of approval from the adjacent property owner.

Fence permits in Maryland cities

Select your city for specific fence permit rules, fees, and application details.

Permit requirements vary by city and county. The information in this guide provides general guidance for Maryland based on common local building codes. Always verify requirements with your local building department before starting your project.