Fence rules in York, Pennsylvania
Source: local code / Updated December 1, 2026
Fences are capped at 6 feet in most districts, 10 feet in the EC district, and 6 feet in the CDB district. Barbed wire and electric fences are barred in residential districts, and fences may not be built from scrap sheet metal or junk.
The short answers
Applies to: residential districts; exception allowed for unusual hazards with Zoning Officer approval (Barbed / razor wire, Electric fences)
Max height, front yard
Local code6ft
Applies to: all districts other than EC and CDB
Source wording [1]How York compares nearby
Fence rules in the closest places we cover. A blank means the code we have does not say.
| Place | Max height, front yard | Max height, side yard | Max height, rear yard | Permit required |
|---|---|---|---|---|
| York | 6 ft | |||
| York Township5 mi | 4 ft | 6 ft | 6 ft | Yes |
| Windsor Township6 mi | 6 ft | 6 ft | 6 ft | Yes |
| Conewago Township8 mi | 3 ft | 8 ft | 8 ft | |
| Chanceford Township15 mi | 6 ft | 6 ft | 6 ft | |
| Martic Township23 mi | 4 ft | 6 ft | 6 ft |
What the code says
The exact wording behind each answer, checked against the source text.
- [1]
YorkLocal code7.02
A maximum height of six feet shall apply to any fence.
Supports: Max height, front yard
- [2]
YorkLocal code7.02
No fence in a residential district shall be constructed out of barbed wire or be electrically charged
Supports: Barbed / razor wire, Electric fences
- [3]
YorkLocal code7.02
shall be constructed from scrap sheet metal or
Supports: Prohibited materials
Source documents
Codes change, and some rules depend on your zoning district or lot. Confirm with York before you build or apply. Spotted something out of date? Tell us.