Short answer
Not a fence specifically. Section 459-305 of Pennsylvania's Dog Law requires owners to keep their dogs confined on their own property, and it names a fence as one way to do it, along with a collar and chain or another device. What the law rules out is letting a dog roam. Your township then limits the fence itself; Lansdale, for example, bans fencing made entirely of wire. This isn't legal advice.

What § 459-305 says, in plain English
The Dog Law's confinement section requires an owner to keep a dog confined within the owner's premises by a collar and chain, a fence or some other device. A violation is an offense under the Dog Law. The law doesn't specify a fence height or style; it cares about the result, which is a dog that stays on your property.
Fence, tie-out or electronic fence?
| Option | Local catch |
|---|---|
| Physical fence | Must meet your township's height, placement and material rules. Lansdale bans fencing that is entirely wire and limits picket gaps to 4 in; Upper Moreland bans wire fences and requires chain link to be vinyl-coated. |
| Collar and chain | Listed in § 459-305, but it keeps a dog in place without keeping anything else out. |
| Electronic or in-ground pet fence | Horsham's code expressly exempts invisible pet fencing from its electric-fence restrictions. Montgomery Township bans electric fences except for agriculture; whether that reaches in-ground pet systems isn't stated, so ask the township. |
Checked October 2026 from the cited code. Codes change; we confirm with the zoning office before every install.
Dogs declared dangerous
A dog that has been declared dangerous falls under much stricter state rules. Outside its enclosure, it must be muzzled and on a leash or chain no longer than 3 ft with at least 300 lb of tensile strength (7 Pa. Code § 27.9). If you're in that situation, talk to a Pennsylvania attorney before you build anything.
Fitting a dog fence to the local code
Most dog yards here end up being back yards, because front-yard rules are tight. Lansdale allows only open "architectural" fences in front of the house, and the current code caps them at 3 ft. Upper Dublin allows 4 ft in front with a 36-in gate on each street frontage. Montgomery Township doesn't allow boundary fences in front yards at all unless the lot faces a major street, and caps decorative front fences at 3 ft. Behind the house, 6 ft is the usual limit, and Upper Gwynedd and North Wales allow 6 ft 6 in.
Wildlife has raised the stakes. Lansdale police issued coyote notices in December 2024, and in May 2026 a young black bear walked from Towamencin into Lansdale along Berks Road before wardens caught it in Whitpain.
Features for diggers, jumpers and squeezers
- Diggers: a buried wire barrier along the inside of the fence line, or concrete mow strips at gates.
- Jumpers: the full height your township allows, with nothing near the fence to launch from.
- Squeezers: picket or baluster gaps sized to your dog, not to the catalog's standard spacing.
- Escape artists: self-closing, self-latching gates, so a delivery driver can't leave one open.
Bring your dog's size and habits to the estimate. We'll design the gaps, the height and the gates around them.
Common questions
Is an invisible fence legal in my township?
Horsham's code expressly allows invisible pet fencing. Montgomery Township prohibits electric fences except for agricultural uses and doesn't say whether in-ground pet systems count, so ask the zoning office.
Can my dog be in the front yard?
Only if it's confined there, and front-yard fence rules are strict here. In Lansdale, Upper Dublin and Montgomery Township a full-height privacy fence isn't allowed in front of the house.
Does chain link count as a wire fence in Lansdale?
See are wire fences allowed in Lansdale for how the borough's all-wire ban works.