State guide Reviewed November 2026

Do You Need a Permit to Build a Fence in Pennsylvania?

Not under the state default for a fence no more than 6 feet high: 34 Pa. Code 403.62 lists it among work needing no permit, if it breaks no law or ordinance. Your municipality may tighten that, and zoning can limit front-yard fences: Philadelphia requires a zoning permit for front fences over 4 feet, and Pittsburgh reviews every fence.

Statewide rule No UCC permit for fences up to 6 ft 34 Pa. Code 403.62(c)(1), if the work breaks no law or ordinance; a town may adopt rules that meet or exceed 403.62.
Who issues it Your municipality or its code agency Over 90% of the 2,562 municipalities enforce the UCC locally; in opt-out ones you hire a certified third-party agency yourself.
Outside city limits Boroughs and townships run the same system The Act's municipality list (city, borough, town, township, home rule) names no counties. Most zoning is municipal too.
Height that triggers it Over 6 ft by default; local zoning may differ Philadelphia: zoning permit for a front fence over 4 ft or over 50% solid. Pittsburgh: zoning review for every fence.
How Pennsylvania sets building rules. Pennsylvania's Uniform Construction Code (Act 45 of 1999 and 34 Pa. Code Chapters 401 to 405) applies statewide and, under the triennial update effective January 1, 2026, adopts the 2021 International Residential Code and the 2021 ISPSC with state amendments; projects contracted earlier follow the codes in effect at contract. Municipalities enforce it themselves or opt out to certified third-party agencies, and may adopt stricter ordinances through the Act's section 503 procedure with Department review, or keep pre-July 1999 ordinances that equal or exceed it.

What does Pennsylvania state law say about fences?

Under 34 Pa. Code 403.62(c), no Uniform Construction Code permit is required for fences that are no more than 6 feet high, or for retaining walls not over 4 feet measured from the lowest level of grade to the top of the wall, unless the wall supports a surcharge. Both exemptions apply only if the work does not violate a law or ordinance.

The exemption stops at 6 feet. The general permit rule in 403.62(a) speaks of work on a residential building, which the Act defines to include accessory structures; it does not name fences. On that reading, expect a fence over 6 feet to need a building permit where the code is enforced, and confirm with your municipality's building code official. The code adopts the 2021 International Residential Code with Pennsylvania amendments; the current text took effect January 1, 2026, and a project whose design or construction contract was signed earlier follows the codes in effect when it was signed.

Can my township or borough set stricter fence rules?

It can. 34 Pa. Code 403.102, the rule for municipalities that enforce the code, says in subsection (l)(8) that a municipality may enact an administration and enforcement ordinance that meets or exceeds the requirements of 403.62(a) to (e), the permit requirements and exemptions. In practice that lets it require a permit for work the state list exempts. An ordinance that sets standards above the code itself goes through Act section 503: a public hearing, newspaper notice, and filing with the Department for review before it takes effect. Zoning is separate: under the Municipalities Planning Code a municipality may enact its own zoning ordinance, which is where front-yard height limits and setbacks come from.

In Philadelphia a wood, metal or vinyl fence up to 6 ft in a side or rear yard needs no permit, while masonry over 2 ft, or any fence on a Historic Registry or 100-year floodplain property, needs a building permit, and a front fence over 4 ft or more than 50% solid needs a zoning permit; 6 ft is the zoning cap. Pittsburgh requires a zoning application for every fence and caps a fence closer to the street than the house at 4 ft, open and ornamental.

Who issues fence permits in Pennsylvania?

Your municipality. According to the Department of Labor and Industry, over 90% of Pennsylvania's 2,562 municipalities enforce the code locally, with their own staff or a certified third-party agency they retain. In a municipality that opted out, the Department says third-party agencies hired by property owners or their contractors enforce the residential code, and 34 Pa. Code 403.103 requires the applicant to obtain such an agency for plan review and inspections.

The Act defines a municipality as a city, borough, incorporated town, township or home rule municipality. Counties are not on that list, so on that reading a county office is not where a building permit starts; the Act does keep one county role, since municipalities in a county of the second class do not enforce the code's plumbing provisions. In a rural township, start with the township office.

What rules apply even when no permit is needed?

A fence that serves as a pool's barrier must meet the pool barrier rules. The state-adopted 2021 International Swimming Pool and Spa Code, read here on the UpCodes mirror, requires the top of the barrier to be at least 48 inches above grade on the side away from the pool, with self-closing, self-latching gates.

Act 45 preempts homeowners' associations from imposing building construction standards or building codes, except as the Act otherwise provides. A fence is not clearly a building, and the section does not on its face address fence style or placement, so read your deed restrictions and association rules too. Boundary and shared-fence disputes are civil matters between neighbors; this guide covers permits only.

Who can build a fence in Pennsylvania?

You can: work an owner does without compensation on their own private residence is outside the Home Improvement Consumer Protection Act. The Department of Labor and Industry says the state has no licensure requirement for most construction contractors, and that some municipalities have set their own. A paid fence installer must register with the Attorney General under that Act, which names fences and covers jobs over $500 at a private residence, unless the installer's home improvements totaled under $5,000 the previous year.

Fence Permit rules in the 2 Pennsylvania cities we have researched

Each row is read off our page for that city, which quotes the city’s own code section and fee schedule. Follow the city link for the conditions on each rule, the worked fee examples and the sources.

CityOrdinary fenceBuilding permit starts atZoning height caps: front · side and rearCity fee for a 6 ft wood fence
PhiladelphiaExempt below a heightOver 6 ft in a side or rear yard; masonry over 2 ft; zoning permit for a front fence over 4 ft or more than 50% solid4 ft and no more than 50% opaque front · 6 ft$0 side or rear; a 5 ft front fence $50 zoning; over 6 ft $126.50
PittsburghZoning filing, any heightOver 6 ft; a Building and Development Application with zoning review for every fence4 ft, open and ornamental, closer to the street than the house · 6 ft; Administrator Exception adds at most 1 ft ($100)$50 zoning review minimum (+ $2 technology fee); over 6 ft about $291.50 with PLI review

A ⚠ marks a city whose own documents give two different answers. To compare more cities, see fence permit rules in 30 cities and fence permit fees in 30 cities.

Not in one of these cities?

The rule that binds you is the one your own city has adopted, or your county’s if you live outside city limits. Ask the building department for its list of work exempt from permit and its zoning rules for accessory structures before you buy materials; the phone call is free and the answer is specific to your lot.

Frequently asked questions

Under the state default, a fence no more than 6 feet high needs no building permit, as long as it does not violate a law or ordinance. Your municipality may require more, and its zoning can limit front-yard height. In Philadelphia a front fence over 4 feet, or more than 50% solid, needs a zoning permit; Pittsburgh caps a fence closer to the street than the house at 4 feet, open and ornamental.
Under the state code, a retaining wall not over 4 feet tall, measured from the lowest level of grade to the top of the wall, needs no permit unless it supports a surcharge. A taller wall is outside that exemption, so expect to need a permit, and a local ordinance can require one for lower walls. Ask your building code official.
Yes, if it is the pool's barrier. Pennsylvania adopted the 2021 International Swimming Pool and Spa Code, which requires a barrier at least 48 inches high measured on the side away from the pool, openings that a 4-inch sphere cannot pass, and self-closing, self-latching gates that open away from the pool.
It might. The state building code exemption does not override zoning, and the Municipalities Planning Code lets each municipality enact its own zoning ordinance. A zoning ordinance can require a permit for fences or limit front-yard height. Pittsburgh, for example, requires a zoning application for every fence. Call your municipal office before you dig post holes.
There is no state license for most construction contractors, though some municipalities license contractors. A contractor installing a fence at your home for more than $500 must be registered with the Attorney General under the Home Improvement Consumer Protection Act, which names fences, unless their prior-year home improvement work was under $5,000.

Sources

Every statement about state law on this page is taken from the documents below, read on the date shown at the top. Laws and adopted code editions change; the linked text is the authority, and your city or county building department has the final word on your project.

  • 34 Pa. Code § 403.62(c)(1); 34 Pa. Code § 403.62(c); 34 Pa. Code § 403.62(c)(2); 34 Pa. Code § 403.62(a) — pacodeandbulletin.gov
  • Act 45 of 1999, section 103 (35 P.S. § 7210.103), definition of residential building; Act 45 of 1999, section 503(c) (35 P.S. § 7210.503); Act 45 of 1999, section 503(d) (35 P.S. § 7210.503); Act 45 of 1999, section 503(e) (35 P.S. § 7210.503); Act 45 of 1999, section 503(f) (35 P.S. § 7210.503); Act 45 of 1999, section 103 (35 P.S. § 7210.103), definition of municipality; Act 45 of 1999, section 501(a.1) (35 P.S. § 7210.501); Act 45 of 1999, section 104(d)(2)(i) (35 P.S. § 7210.104) — palegis.us
  • 34 Pa. Code § 403.102 (title); 34 Pa. Code § 403.102(l); 34 Pa. Code § 403.102(l)(8) — pacodeandbulletin.gov
  • 34 Pa. Code § 403.21(a)(7); 34 Pa. Code § 403.21 Source note; 34 Pa. Code § 403.21(a)(14) — pacodeandbulletin.gov
  • Department of Labor and Industry, Uniform Construction Code page — pa.gov
  • 34 Pa. Code § 403.1(a)(2) — pacodeandbulletin.gov
  • 34 Pa. Code § 403.103(b) — pacodeandbulletin.gov
  • Municipalities Planning Code, Act 247 of 1968, section 601 (53 P.S. § 10601); Municipalities Planning Code, section 602 (53 P.S. § 10602) — palegis.us
  • ISPSC 2021 § 305.2.1 as adopted in Pennsylvania (UpCodes mirror); ISPSC 2021 § 305.2.2 as adopted in Pennsylvania (UpCodes mirror); ISPSC 2021 § 305.3 as adopted in Pennsylvania (UpCodes mirror) — up.codes
  • Department of Labor and Industry, Contractor Licensing page — pa.gov
  • Home Improvement Consumer Protection Act, Act 132 of 2008, section 3(a) (73 P.S. § 517.3); Home Improvement Consumer Protection Act, section 2 (73 P.S. § 517.2), definition of home improvement, paragraph (1); Home Improvement Consumer Protection Act, section 2 (73 P.S. § 517.2), definition of contractor; Home Improvement Consumer Protection Act, section 2 (73 P.S. § 517.2), paragraph (2)(v); Home Improvement Consumer Protection Act, section 2 (73 P.S. § 517.2), paragraph (1)(ii) — palegis.us

Related: Pennsylvania shed permit · Pennsylvania deck permit · Pennsylvania pool permit · Fence permit guide · All state guides

Stay up to date
Get notified when we add new cities or update permit fees.