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.
| City | Ordinary fence | Building permit starts at | Zoning height caps: front · side and rear | City fee for a 6 ft wood fence |
|---|---|---|---|---|
| Philadelphia | Exempt below a height | Over 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% solid | 4 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 |
| Pittsburgh | Zoning filing, any height | Over 6 ft; a Building and Development Application with zoning review for every fence | 4 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
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