There are 8 million stories in the naked city — and almost as many ways to break the law.

The 21 volume New York City Charter and Administrative Code, and the 14 volume Rules of the City of New York, go way beyond stealing and murder, encompassing an array of strange regulations.

Years ago, savvy officials began to repeal many of the city’s most outdated laws, so New Yorkers are no longer arrested for fancy riding, charging more than 50 cents to move a piece of furniture or driving faster than 8 mph. But old school hasn’t disappeared entirely; its still illegal for “pullers-in,” or street touts, to solicit and to run horses up and down the street. And some older buildings still have private bylaws barring minorities from occupying units,and banning single women from entertaining men past a certain hour.

Put your lawyer on speed dial if you wish to own a mountain lion, grizzly bear, aardwolf, kinkajou or odd-toed ungulate — all illegal. And what New Yorker can forget Rudy Giuliani’s notorious on-the-air scolding of a ferret-fancying legal advocate: “. . . This excessive concern with little weasels is a sickness . . . you need help!”

Rooster-owning is similarly verboten, at least in “a built up portion of the city” (is there anything else?). And even the most fashion-forward can’t dye pet rabbits in the season’s newest shade, or any color at all. While the ends might justify the means, tampering with a horse’s tail earns a year in jail. But beekeeping is now legal, although the change comes too late for Kathleen Boyer of Flatbush, who just last year was stung by a $2,000 fine from the Department of Health.

Spitting on New York streets and sidewalks is illegal, as is littering them with dead animals and offal. Those itching to grow poison ivy will brush up against the Department of Health, as will residents beating their dirty carpets onto city sidewalks. But the placement of a gala “red carpet” on a sidewalk is strongly recommended, maybe because of required red-carpet licensing fees of up to $24,000.

Even the most obscure laws can sometimes become political footballs, as City Hall interns scramble to provide legal cover for the latest lifestyle crackdown. Mayor Giuliani padlocked nightclubs by requiring a cabaret license for establishments where three or more people were found dancing, a law still on the books despite a Million Mambo March in protest; Mayor Bloomberg is reconsidering. Politicians themselves aren’t exempt from odd laws — “Candidate Statement” rules outlaw profanity, “obscene hand gestures” and, thankfully, candidate nudity.

Tourist favorite three-card monte is now prohibited, a century after Oliver Utley, an out-of-town farmer, was swindled out of $2,000 by card sharpers. But the 2010 Frommer’s Travel Guide still puts the pastime on its list of things not to do in New York City, along with New Year’s Eve in Times Square and rickshaw rides. And think twice if you get hustled and then decide to make a citizen’s arrest; the use of handcuffs or leg-irons is prohibited to all but law enforcement types.

Landlord-tenant laws continue to prohibit more than three unrelated people from living in the same apartment, a statute still used by owners trying to evict huddled masses of cash-strapped newcomers. And those hipster butchers in Williamsburg can keep cattle and swine in their back yards, as long as they’re securely fenced.

Butchers must grind chopped meat in plain view, and those that sell hamburger with more than 30% fat face 30 days in the slammer. Brighton Beach favorite kopchonka was recently banned — botulism or whatever. But storekeepers can still sell horsemeat, if anyone wants to buy it. Using poisonous cyanide to clean food utensils is understandably frowned upon.

Swill milk laced with plaster and chalk was banned in the 1870s, and the milk we drink today can’t contain blood, puss, manure or even vermin. But Title 24 does allow us to drink chocolate milk, and we are even permitted to slurp our milk through a straw, as long as the straw comes individually wrapped. Law-abiding citizens may also enjoy malted milk, provided “full enzymatic action” is secured, and “frozen desserts” are dispensed by “mobile frozen dessert units,” otherwise known as ice cream trucks.

Even our leisurely pursuits carry worrisome legal risks. Tongue-splitting, the “cutting of a person’s tongue into two or more parts” can only be performed by doctors or dentists. Parachuting is banned except for those in danger or ordered to do so. Less adventuresome New Yorkers can relax by taking a shvitz, though city regulations seem less than comforting, allowing steam rooms to reach 120 degrees and saunas 194.

No wonder signs saying, “Use of steam room or sauna should not exceed 30 minutes” are mandatory.

New York does have an awful lot of rules, and if history holds true, plenty more are in the works. But unique people need unique laws. Leave the kinkajou and the kopchonka to the Californians.

Nathan Belofsky is the author of “The Book of Strange and Curious Legal Oddities” (Penguin), out this week.