NEW YORK — He was a prankster, a master of the put-on that thumbed its nose at what he saw as a stuffy and blundering political establishment.

And as much as anyone else, Paul Krassner epitomized a strain of anarchic 1960s activism — one that became identified with the Yippies as they nominated a pig for president and rained dollar bills onto the floor of the New York Stock Exchange. Along with Abbie Hoffman and Jerry Rubin and a few others, Mr. Krassner helped found that group, and he also joined Ken Kesey and the Merry Pranksters on their LSD-fueled bus trip across America.

He was the founder and editor of The Realist, among the earliest underground humor magazines, one that was known for outlandish and raunchy cartoons and iconoclastic political and social commentary. Its contributors included Norman Mailer, Jules Feiffer, Terry Southern, Joseph Heller, and Mort Sahl. With some very long breaks, it endured into the 21st century.

Yet so naturally irreverent was Mr. Krassner that when People magazine labeled him the “father of the underground press,” he demanded a paternity test.

In all, he helped propagate a certain absurdist sensibility that encouraged people such as cartoonists R. Crumb and Art Spiegelman and comedian George Carlin to be more daring in mocking the insanities and hypocrisies of war, politics, and much of modern life.

Mr. Krassner died Sunday at his home in Desert Hot Springs, Calif., his daughter, Holly Krassner Dawson, told The Associated Press. He was 87. She did not give a cause, but said he had been in hospice care.

Mr. Krassner was writing freelance pieces for Mad magazine in 1958 when he realized that there was no equivalent satirical publication for adults; Mad, he could see, was largely targeted at teenagers. So he started The Realist out of the Mad offices, and it began regular monthly publication.

By 1967, its circulation had peaked at 100,000.

“I had no role models and no competition, just an open field mined with taboos waiting to be exploded,” Mr. Krassner wrote in his autobiography.

The magazine’s most famous cartoon was one, drawn in 1967 by Mad artist Wally Wood, of an orgy featuring Snow White, Donald Duck, and a bevy of Disney characters enjoying a variety of sexual positions. (Mickey Mouse is shown shooting heroin.) Later, digitally colored by a former Disney artist, it became a hot-selling poster that supplied Mr. Krassner with modest royalties into old age.

Avery Corman, author of “Kramer vs. Kramer” and other books, whose first essays appeared in The Realist, called Mr. Krassner “a cultural pioneer.”

“The pieces he wrote himself and the material written by others were saying to people that what we’re told by the establishment and the media may not be true, may be distorted, and at that time that was not an accepted idea,” Corman said in a 2016 interview. “For young people trying to dope out what the world was like, being a Realist reader was a way of distinguishing yourself: ‘I’m not gullible, I’m skeptical.’”

By the 1970s, The Realist was struggling financially and being published more haphazardly; for years it did not come out at all. In the mid-1980s it was revived as a newsletter. It ceased publication in 2001.

Mr. Krassner was also the keeper of the legacy of one of his mentors, Lenny Bruce. He edited Bruce’s autobiography, “How to Talk Dirty and Influence People” (1965) and was nominated for a Grammy Award for his 5,000-word liner notes to a collection of Bruce’s nightclub routines, “Let the Buyer Beware.”

Encouraged by Bruce, Mr. Krassner often took to the stage, delivering comic monologues at nightclubs. He and his East Village friends also dreamed up pieces of public tomfoolery.

In one, in 1968, a group of 60 hippies chose to turn the tables on tourists streaming into the East Village to gape at its scruffy, longhaired denizens. With cameras dangling from their necks, the hippies hired a Greyhound bus for a sightseeing tour of the tidy middle-class neighborhoods of Queens.

In 1967, Mr. Krassner, Hoffman, and friends formed an organization to meld hippies and earnest political types. Mr. Krassner dreamed up the name Youth International Party — Yippie for short.

Their theatrical shenanigans included streaming to Washington to “levitate” the Pentagon and organizing a nighttime “yip-in” at Grand Central Terminal to celebrate spring; it drew some 3,000 revelers, prompting nightstick-swinging police officers to charge the crowd and arrest 17 as protesters yelled “Fascists!” The press seemed transfixed by their antics.

“It was mutual manipulation,” Mr. Krassner said, reflecting on his life in an interview for this obituary in 2016. “We gave them good stories and sound bites, and they gave us free publicity.”

In August 1968, the group made its way to the Democratic National Convention in Chicago and held a festival that, along with antiwar protests, prompted another police charge, this one bloodier. Television cameras caught what a national commission was to term “a police riot.” Hoffman and Rubin were among those convicted of crossing state lines to incite a riot, though those convictions were reversed on appeal. Mr. Krassner was named an unindicted co-conspirator.

Paul Krassner was born on April 9, 1932, in Brooklyn, the second of three children. His father, Michael, was a printing compositor for The Long Island Star-Journal who had a cynical streak and, according to his son, worried about efforts by government and business “to manipulate the human mind.” His mother, Ida, who had emigrated as an infant from Russia, was a legal secretary and instilled in him the maxim “Nothing ventured, nothing gained.”

Paul was a violin prodigy, playing a Vivaldi concerto at Carnegie Hall when he was 6, but he gave up practicing regularly because he found his instructor too controlling. Still, he traced his bent for humor to that Carnegie Hall recital. When in midperformance he tried to soothe an itch in his left leg by scratching it with his right foot, the audience burst out laughing, and he realized he loved that sound more than the applause for his playing.

He attended City College, though he dropped out three credits short of a degree, disappointing his parents. “They had learned by then that I was a rebel,” he said.

He was earning money working for The Independent, a newspaper run by anti-censorship crusader Lyle Stuart. It turned out that Stuart was also the business manager of Mad, and Mr. Krassner began writing humor pieces for it.

Stuart also gave him a list of subscribers to a small progressive magazine that was closing down, and Mr. Krassner managed to persuade 600 of those readers to buy his satirical replacement, The Realist.

An interview in the magazine with a doctor who performed abortions at a time when they were illegal led to Mr. Krassner’s first foray into serious activism. After receiving calls from women seeking information about how they, too, could obtain abortions, he set up a service to refer pregnant women to qualified doctors. He was subpoenaed by two district attorneys but never prosecuted.

With the demise of The Realist, Mr. Krassner had to scratch out a living. He wrote columns for such magazines as High Times and Adult Video News and blogs for The Huffington Post. He served a short stint as publisher of Hustler. In 1994 he published a memoir, “Confessions of a Raving Unconfined Nut: Misadventures in the Counter-Culture.”

(STORY CAN END HERE. OPTIONAL MATERIAL FOLLOWS.) In 2003, Krassner joined with others surviving Yippies to form a speakers bureau, charging several thousand dollars for talks to college audiences.

“This is the anti-war equivalent of a veterans’ group,” Krassner told The New York Times. “It’s strange to be 70 and still identify with a youth movement. But I’d rather identify with evolution than stagnation.”