California Backyard Pig Laws by County: Zoning, Permits, HOA Restrictions, and More
March 22, 2026

California is home to thousands of pig enthusiasts — from urban dwellers dreaming of a potbellied companion to rural landowners raising swine for agriculture. But before you bring a pig home, you need to understand one critical reality: whether keeping a backyard pig is legal in California depends almost entirely on where you live.
State law sets the baseline, but your county, city, and even your homeowners association layer on additional rules that can make or break your plans. Zoning classifications, permit requirements, breed restrictions, and neighborhood covenants all play a role. Getting any one of them wrong could mean fines, forced rehoming, or legal action.
This guide walks you through everything you need to know about backyard pig laws in California — from how the state classifies pigs to what your local ordinances actually allow.
Are Backyard Pigs Legal in California?
The short answer is: it depends. California does not have a single statewide law that flatly bans or universally permits backyard pig ownership. Instead, legality is determined by a patchwork of state agricultural codes, local zoning ordinances, and municipal regulations that vary dramatically from one jurisdiction to the next.
In rural and agricultural areas, keeping pigs is generally permitted and well-established. In suburban and urban zones, the rules tighten considerably — and in many cities, pigs of any kind are prohibited outright in residential neighborhoods.
Some California cities have carved out specific allowances for miniature or potbellied pigs as companion animals, treating them more like pets than livestock. Los Angeles, for example, permits potbellied pigs in residential zones under certain conditions, while many surrounding cities do not. San Francisco allows miniature pigs as pets in some residential districts, but the rules are nuanced and weight-based restrictions often apply.
Important Note: Even if your city or county permits backyard pigs, you must still comply with state agricultural regulations, local zoning codes, permit requirements, and any HOA rules that apply to your property. All four layers must align before your pig is legally in the clear.
If you’re navigating similar questions for other animals, you may find it helpful to review goat ownership laws in California or backyard chicken laws in California, since many of the same zoning frameworks apply to small livestock across the state.
How California Classifies Pigs — Livestock vs. Pet
One of the most consequential legal questions for any prospective pig owner in California is how the state — and your local government — classifies your pig. That classification determines which rules apply, which agencies have jurisdiction, and what your responsibilities are as an owner.
Under the California Food and Agriculture Code, pigs are classified as livestock, specifically as swine. This means they fall under the oversight of the California Department of Food and Agriculture (CDFA) and are subject to agricultural regulations regardless of their size, breed, or intended purpose. A 12-pound potbellied pig kept as a house pet is, from the state’s perspective, legally the same category of animal as a 600-pound commercial hog.
However, many local governments have created a secondary classification for miniature or potbellied pigs as “companion animals” or “household pets.” This dual classification system is where things get complicated. A city may allow potbellied pigs as pets in residential zones while still prohibiting livestock — meaning the local pet classification effectively overrides the practical impact of the state livestock designation within that jurisdiction.
Key Insight: The breed and size of your pig often determines which classification applies locally. Potbellied pigs (Sus scrofa domesticus) and other miniature breeds are far more likely to receive a “pet” designation from local ordinances than standard farm breeds like Duroc, Hampshire, or Yorkshire pigs.
This classification distinction matters enormously for practical purposes. Livestock-classified pigs may require agricultural permits, must comply with CDFA health and movement regulations, and are subject to different zoning rules than companion animals. Pet-classified pigs may instead fall under local animal control ordinances, require standard pet licensing, and be subject to weight or size caps rather than agricultural oversight.
Understanding which classification your pig falls under in your specific city or county is the essential first step before any other legal consideration.
Zoning and Property Requirements for Keeping Pigs in California
Zoning is the single most important legal factor determining whether you can keep a pig on your property in California. Local zoning codes divide land into categories — residential, agricultural, commercial, industrial — and each category comes with specific rules about what animals, if any, may be kept there.
In agricultural zones (typically designated A-1, A-2, or similar), pigs are almost universally permitted. These zones exist specifically to support farming and livestock operations, and swine are a recognized agricultural use. If your property sits in an agricultural zone, you’re likely in the best position legally, though you may still need permits and must comply with setback and sanitation requirements.
Residential zones are where the real complexity begins. California cities and counties handle residential pig ownership in widely different ways:
- Los Angeles County: Permits swine in agricultural zones and some rural residential zones. Within the City of Los Angeles, potbellied pigs are allowed as pets in residential zones with a weight limit typically cited at under 150 pounds.
- San Diego County: Allows pigs on properties of one acre or more in certain rural residential zones. The City of San Diego generally prohibits swine in standard residential zones.
- Sacramento County: Permits pigs in agricultural and rural zones. City of Sacramento ordinances restrict livestock, including pigs, in most residential districts.
- Santa Clara County: Allows pigs on properties meeting minimum lot size requirements in agricultural zones. Most incorporated cities within the county prohibit backyard pigs in residential areas.
- Alameda County: Pigs permitted in agricultural zones; most incorporated cities restrict or prohibit them in residential zones.
Beyond zoning classification, property-specific requirements typically include minimum lot sizes, setback distances (how far the pig’s enclosure must be from property lines, neighboring homes, and water sources), and sanitation standards. Many jurisdictions require pig enclosures to be set back at least 50 to 100 feet from neighboring residences, a requirement that effectively eliminates most suburban lots from eligibility.
Pro Tip: Before purchasing a pig, contact your local planning or zoning department directly and ask specifically whether swine — including miniature or potbellied pigs — are permitted in your zoning district. Get the answer in writing if possible. Verbal confirmations from staff are not legally binding and can change with personnel turnover.
If you’re curious how other states handle residential livestock zoning, the frameworks used for backyard chickens in Texas and backyard chickens in Arizona offer useful points of comparison for understanding how zoning tiers typically work across jurisdictions.
Size, Weight, and Breed Restrictions in California
Even in jurisdictions that permit backyard pigs, many California cities and counties impose size, weight, or breed restrictions that determine exactly which pigs qualify. These restrictions exist primarily to distinguish companion animals from commercial livestock and to address concerns about noise, odor, and neighborhood impact.
Weight limits are the most common restriction tool. Cities that allow potbellied pigs as pets frequently cap the permitted weight at anywhere from 100 to 200 pounds at full maturity. This is where prospective owners need to be especially careful — many pigs sold as “miniature” or “micro” pigs grow significantly larger than advertised.
| Pig Type | Typical Adult Weight | Common Legal Status in CA Residential Zones |
|---|---|---|
| Potbellied Pig | 60–150 lbs | Permitted in some cities with weight cap |
| Juliana Pig | 20–40 lbs | Often permitted under miniature pig provisions |
| Kunekune Pig | 100–250 lbs | Restricted; may exceed local weight limits |
| American Guinea Hog | 150–300 lbs | Generally restricted in residential zones |
| Standard Farm Breeds (Yorkshire, Duroc, etc.) | 400–700+ lbs | Prohibited in residential zones statewide |
Breed restrictions sometimes accompany weight limits. Some ordinances specifically name potbellied pigs or miniature breeds as the only permitted pig types in residential areas, meaning that even a small standard-breed pig would be prohibited regardless of its actual size. Other ordinances rely entirely on weight thresholds without specifying breed, which creates some flexibility but also uncertainty.
Common Mistake: Trusting a breeder’s claim that a pig will stay “micro” or “teacup” sized. No recognized “teacup pig” breed exists. Many pigs sold under these marketing labels are simply underfed piglets that will grow to 100 pounds or more once properly nourished. If your city has a 75-pound weight cap, a pig that grows beyond that limit puts you in violation — even if you purchased it in good faith as a miniature breed.
Some California jurisdictions also impose restrictions related to the sex of the pig. Intact male pigs (boars) are frequently prohibited in residential areas due to aggression and odor concerns. Many ordinances that permit pigs in residential zones require that any pig kept as a pet be spayed or neutered — and may require proof of the procedure as part of the permitting process.
Permits, Licenses, and Registration Requirements in California
If you’ve confirmed that pigs are permitted in your zone and that your pig meets any applicable size or breed requirements, the next step is understanding what permits, licenses, and registrations you need before your pig sets a hoof on your property.
At the state level, the California Department of Food and Agriculture requires that all swine — regardless of size or purpose — be identified with an official ear tag or tattoo and registered with the CDFA. This requirement applies even to potbellied pigs kept purely as pets. The CDFA’s Livestock Drug and Residue Program and its swine health oversight functions mean that pigs in California exist within a regulatory framework designed for agricultural animals, even when the individual pig is someone’s living room companion.
California also requires a Premises Identification Number (PIN) for any property where livestock, including swine, are kept. This is a free registration through the CDFA that links your property to your animals for disease traceability purposes. Failing to register is a violation of state agricultural law, and it’s a requirement that many backyard pig owners are unaware of until they’re already out of compliance.
Pro Tip: Apply for your CDFA Premises Identification Number before your pig arrives. The process is straightforward and free, but processing takes time. Having your PIN in hand before your pig comes home keeps you compliant from day one.
At the local level, permit requirements vary widely:
- Animal Permit or Use Permit: Many cities require a specific permit to keep a pig, even if pigs are generally allowed in your zone. These permits often involve an application fee, a property inspection, and neighbor notification requirements.
- Livestock Permit: Some counties require a separate livestock permit distinct from standard pet licensing, particularly for pigs classified as agricultural animals rather than companion animals.
- Conditional Use Permit (CUP): In some jurisdictions, keeping pigs in a residential zone requires a Conditional Use Permit — a more involved approval process that typically includes a public hearing and can be denied or revoked based on neighbor complaints.
- Veterinary Health Certificate: Some counties require proof of a current health certificate from a licensed veterinarian before issuing any pig-related permit.
- Spay/Neuter Verification: As noted, some jurisdictions require proof that your pig is altered as a condition of permitting.
Permit fees vary by jurisdiction but typically range from $25 to $150 for initial applications, with annual renewal fees in many cities. Some municipalities also require periodic property inspections to verify ongoing compliance with enclosure and sanitation standards.
For a sense of how permit and licensing frameworks work for other backyard animals in California, the pet laws in California overview and the specifics of hedgehog ownership laws in California illustrate how the state layers local and state requirements across different animal types.
HOA and Neighborhood Restrictions on Backyard Pigs
Even if your city and county give you the legal green light to keep a backyard pig, your homeowners association can still say no — and their rules are enforceable regardless of what local government permits.
HOA governing documents, including Covenants, Conditions, and Restrictions (CC&Rs), Bylaws, and Rules and Regulations, are private contracts that homeowners agree to when purchasing property within an HOA community. These documents frequently contain animal restrictions that go well beyond what local ordinances require. An HOA can prohibit pigs entirely, limit pets to dogs and cats only, impose weight limits stricter than municipal codes, or require board approval before any new animal is brought onto the property.
In California, HOAs have broad authority to enforce these restrictions. Under the Davis-Stirling Common Interest Development Act — the primary law governing HOAs in California — associations can levy fines, place liens on property, and pursue legal action against homeowners who violate CC&R provisions, including animal restrictions. Courts have consistently upheld HOA animal restrictions as valid and enforceable private agreements.
Important Note: California law does provide one notable exception: HOAs cannot prohibit residents from keeping at least one pet (dog or cat) under Civil Code Section 4715. However, this protection applies specifically to dogs and cats — it does not extend to pigs, and HOAs retain full authority to prohibit swine on HOA-governed properties.
If you live in an HOA community and want to keep a pig, here’s what you need to do:
- Obtain and carefully read your CC&Rs, Bylaws, and any Rules and Regulations documents before acquiring a pig.
- Look for language covering “livestock,” “farm animals,” “exotic animals,” and “pets” — pigs may be addressed under any of these categories.
- If the documents are ambiguous, submit a written inquiry to the HOA board requesting a formal written interpretation before proceeding.
- If the HOA permits pigs or is silent on the issue, consider requesting a formal written approval from the board before bringing your pig home — this protects you if the board later attempts to change its position.
- Be aware that HOAs can amend their governing documents to add new restrictions. Even if pigs are currently permitted, a board vote could change that.
Beyond formal HOA restrictions, general neighborhood dynamics matter even in non-HOA areas. California nuisance laws allow neighbors to pursue legal action if your pig creates unreasonable noise, odor, or sanitation problems — regardless of whether your pig is technically permitted under local ordinances. Proactive communication with neighbors, proper enclosure management, and routine sanitation go a long way toward preventing conflicts that could escalate into legal complaints.
Understanding how neighborhood restrictions interact with local animal laws is a recurring theme across California animal ownership questions. The same dynamics apply to backyard chickens in California and even to questions covered under dog leash laws in California, where HOA rules frequently exceed what municipal codes require.
Key Insight: If you’re in an HOA and your CC&Rs prohibit pigs or farm animals, there is no workaround. Obtaining a city permit does not override HOA restrictions. Your only options are to seek a formal amendment to the CC&Rs — which requires a homeowner vote — or to find a property not subject to HOA governance.
For prospective pig owners who are still in the property search phase, this is worth factoring into your real estate decisions. Rural properties outside HOA jurisdiction in agricultural zones offer the most permissive environment for pig ownership in California. If you’re committed to keeping a pig and want to avoid the layered restrictions of HOA life, prioritizing non-HOA properties in appropriately zoned areas will save you significant legal headaches down the road.
Comparing how other states handle backyard livestock restrictions can also help you appreciate the range of regulatory approaches. States like Georgia, Kentucky, and Florida each take meaningfully different approaches to residential livestock, and California’s framework sits on the more regulated end of that spectrum — particularly in urban and suburban areas.
Ultimately, keeping a backyard pig in California is possible — but it requires doing your homework at every level of the regulatory stack. Confirm your zoning, understand the state’s classification and registration requirements, check your local permit rules, and review your HOA documents before you ever bring a pig home. Taking those steps in order protects you, your pig, and your neighbors.