Because a hedgehog is commonly kept in a cage or similar enclosure, it is allowed in some residences where cats and dogs are not allowed.
It is illegal to own a hedgehog as a pet in some US states and some Canadian municipalities, and a license is needed to legally breed them. These restrictions may have been enacted due to the ability of some hedgehog species to carry foot and mouth disease, a highly contagious disease of cloven-hoofed animals. No such restrictions exist in most European countries. Residents of the US should check with animal control before considering having a hedgehog as a pet.
The following lists refer to legal issues which will change over time. The legality of owning a pet hedgehog should be verified with the prospective owner's local animal control office.
The following is a list of locations where it is illegal to own a hedgehog. By African Pygmy hedgehog, this list is referring to the domesticated hedgehog commonly bred and sold as pets, not a specific breed of hedgehog from Africa.
Omaha Nebraska, USA
New York City, New York, USA (a call to the City's 311 information service indicated that hedgehogs are not specifically prohibited--not listed in any way by name as either definitely legal or illegal. They were listed as illegal in the City Health Code in 2000)
Fairfax County, Virginia, USA (legal as of Feb 2019)
Other Legal Issues
Spain: European hedgehogs are protected and cannot be kept as pets. African Pygmy hedgehogs may legally be kept as pets.
Finland: European hedgehogs are protected and cannot be kept as pets. African Pygmy hedgehogs may legally be kept as pets.
Austria: European hedgehogs are protected and cannot be kept as pets. African Pygmy hedgehogs may legally be kept as pets.
Australia: All hedgehogs are classified as exotic pets that are illegal to import.
In Arizona, USA, a permit is required; the permit is very difficult to obtain.
In Idaho and Oregon, USA, European hedgehogs are illegal. African Pygmy hedgehogs are legal.
In Maine, New Jersey and Wyoming, USA, a permit is required.
In Wisconsin, USA, an import permit from the state department of agriculture is required to bring a hedgehog into the state.
In Pennsylvania, USA, hedgehogs may not be imported into the state, but hedgehogs in the state as of 1992 and their descendants are at least theoretically allowed. In practice, enforcement of this law has been rumored to be arbitrary and ill-informed. 
In Quebec, Canada, European hedgehogs are illegal. African Pygmy hedgehogs are legal.
Exotic Nutrition is proud to serve hundreds of universities, zoological parks, veterinarians, research centers and other institutions seeking to advance the health and well-being of exotics worldwide. See a full list of institutions using our products here.
Exotic Nutrition has a heart for animals in need. Through regular donations to rescues, rehabilitators, and special fundraiser events, Exotic Nutrition is making a significant impact in the lives of animals. See a full list of our charitable