§TownLaws

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 code

6ft

Applies to: all districts other than EC and CDB

Source wording [1]

Barbed / razor wire

Local code

Not allowed

Source wording [2]

Electric fences

Local code

Not allowed

Source wording [2]

Prohibited materials

Local code

scrap sheet metal, junk

Source wording [3]

How York compares nearby

Fence rules in the closest places we cover. A blank means the code we have does not say.

PlaceMax height, front yardMax height, side yardMax height, rear yardPermit required
York6 ft
York Township5 mi4 ft6 ft6 ftYes
Windsor Township6 mi6 ft6 ft6 ftYes
Conewago Township8 mi3 ft8 ft8 ft
Chanceford Township15 mi6 ft6 ft6 ft
Martic Township23 mi4 ft6 ft6 ft

What the code says

The exact wording behind each answer, checked against the source text.

  1. [1]

    YorkLocal code7.02

    A maximum height of six feet shall apply to any fence.

    Supports: Max height, front yard

  2. [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. [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.