Fence Laws in Maryland (2026): Rules Every Homeowner Must Know
Most people assume building a fence is simple. You pick a style, hire someone, and that’s it. But in Maryland, the rules are more layered than that. Get it wrong, and you could face neighbor disputes, fines, or even a court order to tear it down.
Here’s everything you need to know before you dig a single post hole.
What Are Maryland Fence Laws?

Maryland fence laws cover who owns a fence, who maintains it, and how tall it can be. They also cover what happens when a fence ends up on the wrong property.
Here’s the thing: Maryland does not have one single statewide fence law. Instead, the state uses a mix of common law rules and local county ordinances. That means the rules in Baltimore City can be very different from the rules in Montgomery County or Hagerstown. Always check your local county regulations before you build.
Who Owns the Fence?
Okay, this one surprises a lot of people.
In Maryland, if a fence sits directly on the property line, both neighbors own it. That’s the common law rule the state follows. Both neighbors share the responsibility for maintaining and repairing that fence.
But there’s a catch. If your neighbor never agreed to the fence, they are not required to chip in for building it. They also do not have to pay for repairs unless they use the fence. “Using” a fence means connecting another fence to it or keeping animals inside its enclosure.
What if you build a fence entirely on your own property? Then it is yours. You own it and you are solely responsible for it.
Buying a Home With an Existing Fence

Here’s one most new homeowners miss.
When you buy a home with an existing shared fence, you take on the previous owner’s responsibilities. If the previous owner shared maintenance costs with the neighbor, you are now expected to do the same. Before you close on a house, ask about existing fence agreements. It can save you a headache later.
Fence Height Rules in Maryland
Height rules depend on where you live. Most residential areas follow similar general guidelines, but your county has the final say.
In Baltimore City, front yard fences are limited to 42 inches tall. That is 3.5 feet. Side and rear yard fences can go up to six feet. Commercial and industrial properties may build fences up to eight feet tall.
Baltimore County follows those same basic limits: 42 inches in front yards and six feet in side and rear yards. The county does offer one exception. You can build a fence up to ten feet tall in a side or rear yard if you set it back two feet from the property line for every foot above six feet.
In Montgomery County, the maximum fence height is 6.5 feet for most residential properties.
Hagerstown has its own rules too. Front yard fences are generally not allowed in some zones. Side and rear yard fences may go up to eight feet tall in certain areas.
The general rule of thumb across Maryland? Six feet for side and rear yards, around 42 inches for front yards. But always verify with your county.
Pool Fences: A Special Rule

Hold on, this part is important.
If you have an in-ground swimming pool, Maryland requires a fence around it. The fence must be at least 48 inches tall. It also needs a self-closing, self-latching gate. This is a safety requirement, not just a suggestion. Baltimore County and most other jurisdictions enforce this strictly.
Do You Need a Permit?
Short answer: probably yes.
Most Maryland counties require a permit to install a new fence. In Montgomery County, a permit is required for any type of fence. In Baltimore City and Baltimore County, permits are also required for most new fence installations.
In many areas, you will need to submit a copy of your property plat. That is a diagram showing your property’s boundaries and where your house sits. You also mark where the new fence will go. Some counties, like Montgomery County, require a letter of approval from your neighbor if the fence sits on the shared property line.
Permit fees and processes vary by county. Most permits in Montgomery County are issued within three days of a complete application. Check your local Department of Planning and Zoning or Building Permit office for exact requirements.
Good news: in Montgomery County, replacing an existing fence with the same type of fence in the same location does not require a new permit, as long as the original fence had a permit.
Contractors Must Be Licensed
You’re gonna want to know this one.
Any contractor installing a fence in Maryland must have a Maryland Home Improvement Commission (MHIC) license. This is different from a general contractor’s license. Always ask your fencing company for proof of their MHIC license before work begins. They should also carry general liability insurance and workers’ compensation coverage.
Property Lines: Know Before You Build
Honestly, this is the part most people skip. And it causes the most problems.
A fence does not create a property line. Property lines already exist based on your deed and official surveys. Many older fences were installed slightly inside or outside of the true property line due to survey errors. You should not assume an existing fence is where your property actually ends.
Before you build, hire a licensed surveyor to confirm your exact property boundaries. If your fence crosses your neighbor’s property line, even by a few inches, they have every right to ask you to move it. Moving a fence after it is installed is expensive and frustrating. Getting the survey done first is much cheaper.
Also remember: Miss Utility must be called before any digging. They mark underground utilities for free. The number is 1-800-257-7777. This is required by law if a contractor is doing the work.
Spite Fences: Yes, They Are a Real Thing
A spite fence is a fence built purely to annoy a neighbor. Maryland does not have a specific statute naming “spite fences,” but the state’s nuisance laws cover them. Courts will weigh the harm the fence causes your neighbor against any real benefit it serves you.
If the fence causes more harm than good, a neighbor can take you to court. They can ask a judge to order the fence removed and seek money damages. Think of it like this: you can build a fence for privacy, security, or aesthetics. But building one just to block someone’s sunlight or view out of anger is legally risky.
Some counties and HOAs have their own stricter rules on spite fences. Always check locally.
HOA Rules on Top of County Rules
If you live in a neighborhood with a homeowners association, you have another layer of rules to follow. HOAs can restrict fence height, style, materials, and color. Some HOAs do not allow front yard fences at all, even if the county permits them. Always review your HOA’s bylaws before you plan or build anything.
Adverse Possession: Don’t Ignore Encroachment
Sound complicated? It is, honestly. But it matters.
Adverse possession is a legal principle that allows someone to claim ownership of land they have occupied for a long time. In Maryland, that time period is 20 years. If your neighbor’s fence has been on your property for decades without you doing anything about it, they could eventually claim legal ownership of that strip of land.
If you believe a neighbor’s fence is on your property, act quickly. Get a survey. Talk to your neighbor. If needed, consult a real estate attorney. Do not wait and hope the problem resolves itself.
What to Do if a Neighbor Builds on Your Property
Start by finding out for sure. Get a survey done. If the survey confirms the fence is on your property, talk to your neighbor calmly and directly. Many disputes get resolved this way.
If talking does not work, you can file a complaint in the circuit court asking for an injunction. An injunction is a court order requiring someone to do something or stop doing something. A judge can order the fence to be moved or removed.
Mediation is also an option. It is less expensive than a full court case and can resolve disputes faster.
How to Stay on the Right Side of the Law
Here’s a simple checklist before you build your fence in Maryland.
First, check your county’s local ordinances for height, materials, and setback requirements. Second, get a property survey to confirm your exact property lines. Third, contact your county’s permitting office to find out if you need a permit. Fourth, talk to your neighbor before you build, especially if the fence is near the property line. Fifth, hire a licensed MHIC contractor. Sixth, call Miss Utility before any digging at 1-800-257-7777.
Pretty straightforward when you break it down like that.
Frequently Asked Questions
Do I need a permit to build a fence in Maryland? In most counties, yes. Montgomery County requires a permit for all fence types. Baltimore City and Baltimore County also require permits for most new fences. Check with your local building or zoning office.
Can my neighbor build a fence on our shared property line? Yes, but it becomes shared property. Both owners are typically responsible for maintenance and repair once both parties are using the fence.
What happens if my fence accidentally crosses my neighbor’s property? Your neighbor has the legal right to ask you to remove or relocate the fence. To avoid this, always get a property survey before you build.
Are there height limits for fences in Maryland? Yes, and they vary by county. Most residential areas allow up to six feet in side and rear yards, and around 42 inches in front yards. Check your specific county rules.
Can I build a spite fence in Maryland? No. Spite fences can result in legal action under Maryland’s nuisance laws. A court can order the fence removed and award damages to your neighbor.
Does my HOA have to follow county fence rules? HOAs can add stricter rules on top of county rules. You must comply with both. If they conflict, the stricter rule usually applies.
Do I need a survey before building a fence? You are not legally required to get one, but it is strongly recommended. A survey prevents expensive disputes over property encroachment.
Final Thoughts
Maryland fence laws are not complicated once you understand the basics. Know your property lines. Check your county rules. Get a permit if you need one. And talk to your neighbor before you start building.
A good fence should add peace to your property, not drama. Take the extra steps upfront and you will save yourself a lot of trouble down the road. When in doubt, contact a local real estate attorney or your county’s zoning office for guidance specific to your situation.
References
- Property Line and Fence Laws in Maryland – FindLaw (Updated June 2025)
- Residential Fence Permit Process – Montgomery County Department of Permitting Services
- Fence Permit – Baltimore County Government
- Fence Regulations – Hagerstown, MD Official Website
- Problems with Neighbors FAQ – Maryland People’s Law Library
- Maryland Fence Laws & Adverse Possession – LVG Law Firm
- A Guide to Fence Laws in Baltimore, MD – Ergeon (January 2026)