Williams voiced characters in several animated films. His voice role as the Genie in the animated musical Aladdin (1992) was written for him. The film's directors stated that they took a risk by writing the role. At first, Williams refused the role since it was a Disney movie, and he did not want the studio profiting by selling merchandise based on the movie. He accepted the role with certain conditions: "I'm doing it basically because I want to be part of this animation tradition. I want something for my children. One deal is, I just don't want to sell anything—as in Burger King, as in toys, as in stuff." Williams improvised much of his dialogue, recording approximately 30 hours of tape, and impersonated dozens of celebrities, including Ed Sullivan, Jack Nicholson, Robert De Niro, Groucho Marx, Rodney Dangerfield, William F. Buckley, Peter Lorre, Arnold Schwarzenegger, and Arsenio Hall. His role in Aladdin became one of his most recognized and best-loved, and the film was the highest-grossing of 1992; it won numerous awards, including a Golden Globe for Williams. His performance led the way for other animated films to incorporate actors with more star power. He was named a Disney Legend in 2009.

Robin McLaurin Williams was born at St. Luke's Hospital, in Chicago, Illinois on July 21, 1951. His father, Robert Fitzgerald Williams, was a senior executive in Ford Motor Company's Lincoln-Mercury Division. His mother, Laurie McLaurin, was a former model from Jackson, Mississippi. Through her, he was a great-great-grandson of Mississippi senator and governor Anselm J. McLaurin. Williams had two elder half-brothers; paternal half-brother Robert (also known as Todd) and maternal half-brother McLaurin. He had English, Scottish, Welsh, Irish, French, and German ancestry.

In late 1963, when Williams was 12, his father was transferred to Detroit. The family lived in a 40-room farmhouse on 20 acres in suburban Bloomfield Hills, Michigan, where he was a student at the private Detroit Country Day School. He excelled in school, where he was on the school's wrestling team and was elected class president.

As both his parents worked, Williams was attended to by the family's maid, who was his main companion. When Williams was 16, his father took early retirement and the family moved to Marin County, settling in Tiburon, California. Following their move, Williams attended Redwood High School in nearby Larkspur. At the time of his graduation in 1969, he was voted "Most Likely Not to Succeed" and "Funniest" by his classmates.

After high school graduation, Williams enrolled at Claremont Men's College in Claremont, California, to study political science; he dropped out to pursue acting. Williams studied theatre for three years at the College of Marin, a community college in Kentfield, California. According to the College of Marin's drama professor James Dunn, the depth of the young actor's talent became evident when he was cast in the musical Oliver! as Fagin. Williams often improvised during his time in the drama program, leaving cast members in hysterics. Dunn called his wife after one late rehearsal to tell her that Williams "was going to be something special".

In 1973, Williams attained a full scholarship to the Juilliard School (Group 6, 1973–1976) in New York City. He was one of 20 students accepted into the freshman class and one of two accepted by John Houseman into the Advanced Program at the school that year; the other was Christopher Reeve. William Hurt and Mandy Patinkin were also classmates. According to biographer Jean Dorsinville, Franklyn Seales and Williams were roommates at Juilliard.

Williams and Reeve had a class in dialects taught by Edith Skinner, who Reeve said was one of the world's leading voice and speech teachers. According to Reeve, Skinner was bewildered by Williams, who could instantly perform in many accents, including Scottish, Irish, English, Russian, and Italian. Their primary acting teacher was Michael Kahn, who was "equally baffled by this human dynamo". Williams already had a reputation for being funny, but Kahn criticized his antics as simple stand-up comedy. In a later production, Williams silenced his critics with his well-received performance as an old man in The Night of the Iguana by Tennessee Williams. "He simply was the old man," wrote Reeve. "I was astonished by his work and very grateful that fate had thrown us together."

During the summers of 1974, 1975 and 1976, Williams worked as a busser at The Trident in Sausalito, California. He left Juilliard during his junior year in 1976 at the suggestion of Houseman, who said there was nothing more Juilliard could teach him. Gerald Freedman, another of his teachers at Juilliard, said that Williams was a "genius" and that the school's conservative and classical style of training did not suit him; no one was surprised that he left.

Williams began performing stand-up comedy in the San Francisco Bay Area in the mid-1970s. He gave his first performance at the Holy City Zoo, a comedy club in San Francisco, where he worked his way up from tending bar. In the 1960s, San Francisco was a center for a rock music renaissance, hippies, drugs, and a sexual revolution, and in the late 1970s, Williams helped lead its "comedy renaissance", writes critic Gerald Nachman. Williams says he found out about "drugs and happiness" during that period, adding that he saw "the best brains of my time turned to mud".

Williams moved to Los Angeles and continued performing stand-up at clubs including The Comedy Store. There, in 1977, he was seen by TV producer George Schlatter, who asked him to appear on a revival of his show Laugh-In. The show aired in late 1977 and was his debut TV appearance. That year, Williams also performed a show at the LA Improv for Home Box Office. While the Laugh-In revival failed, it led Williams into his television career; he continued performing stand-up at comedy clubs such as the Roxy to help keep his improvisational skills sharp. In England, Williams notably performed at The Fighting Cocks.

The first film role credited to Robin Williams is a small part in the 1977 low-budget comedy Can I Do It... 'Til I Need Glasses?.

Mork's appearance proved so popular with viewers that it led to the spin-off television sitcom Mork & Mindy, which co-starred Pam Dawber, and ran from 1978 to 1982; the show was written to accommodate his extreme improvisations in dialog and behavior. Although he portrayed the same character as in Happy Days, the series was set in the present in Boulder, Colorado, instead of the late 1950s in Milwaukee. Mork & Mindy at its peak had a weekly audience of 60 million and was credited with turning Williams into a "superstar." According to critic James Poniewozik, the series was especially popular among young people as Williams became a "man and a child, buoyant, rubber-faced, an endless gusher of the invention."

After the Laugh-In revival and appearing in the cast of The Richard Pryor Show on NBC, Williams was cast by Garry Marshall as the alien Mork in a 1978 episode of the TV series Happy Days, "My Favorite Orkan". Sought after as a last-minute cast replacement for a departing actor, Williams impressed the producer with his quirky sense of humor when he sat on his head when asked to take a seat for the audition. As Mork, Williams improvised much of his dialogue and physical comedy, speaking in a high, nasal voice. The cast and crew, as well as TV network executives, were deeply impressed with his performance.

Williams married his first wife, Valerie Velardi, in June 1978, following a live-in relationship with comedian Elayne Boosler. Velardi and Williams met in 1976 while he was working as a bartender at a tavern in San Francisco.

Williams won a Grammy Award for Best Comedy Album for the recording of his 1979 live show at the Copacabana in New York, Reality ... What a Concept. Some of his later tours, after he became a TV and film star, include An Evening With Robin Williams, Robin Williams: At The Met and Robin Williams: Live on Broadway. The latter broke many long-held records for a comedy show. In some cases, tickets sold out within 30 minutes. In 1986, Williams released A Night at the Met.

Mork became popular, featured on posters, coloring books, lunch-boxes, and other merchandise. Mork & Mindy was such a success in its first season that Williams appeared on the March 12, 1979, cover of Time magazine. The cover photo, taken by Michael Dressler in 1979, is said to have " his different sides: the funnyman mugging for the camera, and a sweet, more thoughtful pose that appears on a small TV he holds in his hands" according to Mary Forgione of the Los Angeles Times. This photo was installed in the National Portrait Gallery in the Smithsonian Institution shortly after his death to allow visitors to pay their respects.

Williams also appeared on the cover of August 23, 1979, issue of Rolling Stone, photographed by Richard Avedon.

During the late 1970s and early 1980s, Williams had an addiction to cocaine.

Starting in the late 1970s and throughout the 1980s, Williams began to reach a wider audience with his stand-up comedy, including three HBO comedy specials, Off The Wall (1978), An Evening with Robin Williams (1983) and Robin Williams: Live at the Met (1986).

His first major performance is as the title character in Popeye (1980). There, Williams showcased the acting skills previously demonstrated in his television work; and the film's commercial disappointment was not blamed on his performance.

He was a casual friend of John Belushi, and the Saturday Night Live comic's death in 1982 from a drug overdose, which happened the morning after the two had partied together, along with the birth of his own son Zak, prompted him to quit drugs and alcohol: "Was it a wake-up call? Oh yeah, on a huge level. The grand jury helped, too." Williams later said of Belushi's death, "It sobered the shit out of me." Williams turned to exercise and cycling to help alleviate his depression shortly after Belushi's death; according to bicycle shop owner Tony Tom, Williams said, "cycling saved my life."

He stars as the leading character in The World According to Garp (1982), which Williams considered "may have lacked a certain madness onscreen, but it had a great core".

William's first son Zachary Pym "Zak" Williams was born in 1983.

In 1986, Williams co-hosted the 58th Academy Awards.

His first major break came from his starring role in director Barry Levinson's Good Morning, Vietnam (1987), which earned Williams a nomination for the Academy Award for Best Actor. The film is set in 1965 during the Vietnam War, with Williams playing the role of Adrian Cronauer, a radio shock jock who keeps the troops entertained with comedy and sarcasm. Williams was allowed to play the role without a script, improvising most of his lines. Over the microphone, he created voice impressions of people, including Walter Cronkite, Gomer Pyle, Elvis Presley, Mr. Ed, and Richard Nixon. "We just let the cameras roll," said producer Mark Johnson, and Williams "managed to create something new for every single take."

Velardi and Williams were divorced in 1988. While it was reported that Williams began an affair with Zachary's nanny Marsha Garces in 1986, Velardi stated in the 2018 documentary Robin Williams: Come Inside My Mind that the relationship with Garces began after the two had separated.

He starred in the best motion picture in the Golden Globes Mrs. Doubtfire (1993), which was a massive success.

Many of his later roles were in comedies tinged with pathos. His roles in comedy and dramatic films garnered Williams an Academy Award for Best Supporting Actor (for his role as a psychologist in Good Will Hunting (1997)), as well as two previous Academy Award nominations (for playing an English teacher in Dead Poets Society (1989)), and for playing a troubled homeless man in The Fisher King (1991). In 1991, he played an adult Peter Pan in the film Hook, although he had said that he would have to lose twenty-five pounds for the role.

Williams and his second wife Marsha founded a philanthropic organization called the Windfall Foundation to raise money for many charities. In December 1999, he sang in French on the BBC-inspired music video of international celebrities doing a cover of The Rolling Stones single "It's Only Rock 'n Roll (But I Like It)" for the charity Children's Promise.

Williams and Billy Crystal were in an unscripted cameo at the beginning of an episode of the third season of Friends. His many TV appearances included an episode of Whose Line Is It Anyway?, and he starred in an episode of Law & Order: Special Victims Unit. In 2010, he appeared in a sketch with Robert De Niro on Saturday Night Live, and in 2012, guest-starred as himself in two FX series, Louie and Wilfred. In May 2013, CBS started a new series, The Crazy Ones, starring Williams, but the show was canceled after one season.

While his mother was a practitioner of Christian Science, Williams was raised in the Episcopal Church his father belonged to. During a television interview on Inside the Actors Studio in 2001, Williams credited his mother as an important early influence on his humor, and he tried to make her laugh to gain attention.

In 2003, Williams started drinking again while working on a film in Alaska.

His stand-up work was a consistent thread throughout his career, as seen by the success of his one-man show (and subsequent DVD) Robin Williams: Live on Broadway (2002). He was voted 13th on Comedy Central's list "100 Greatest Stand-ups of All Time" in 2004.

Williams and Reeve remained close friends until Reeve's death in 2004. Reeve had struggled for years with being quadriplegic after a horse-riding accident. Their friendship was like "brothers from another mother", according to Robin's son Zak Williams. Williams paid many of Reeve's medical bills and gave financial support to his family.

In 2006, he checked himself into a substance-abuse rehabilitation center in Newberg, Oregon, saying he was an alcoholic.

After a six-year hiatus, in August 2008, Williams announced a new 26-city tour, Weapons of Self-Destruction. The tour started at the end of September 2009 and concluded in New York on December 3, and was the subject of an HBO special on December 8, 2009.

In March 2009, he was hospitalized due to heart problems. He postponed his one-man tour for surgery to replace his aortic valve, repair his mitral valve, and correct his irregular heartbeat. The surgery was completed on March 13, 2009, at the Cleveland Clinic.

Garces and Williams had two children, Zelda Rae Williams (born 1989) and Cody Alan Williams (born 1991). In March 2008, Garces filed for divorce from Williams, citing irreconcilable differences. Their divorce was finalized in 2010.

Williams married his third wife, graphic designer Susan Schneider, on October 22, 2011, in St. Helena, California. The two lived at their house in Sea Cliff, San Francisco, California.

After his death in 2014, four films starring him were released: Night at the Museum: Secret of the Tomb, A Merry Friggin' Christmas, Boulevard and Absolutely Anything.

On August 11, 2014, Williams died by suicide in his Paradise Cay, California, home. His body was cremated at Monte's Chapel of the Hills in San Anselmo, and his ashes were scattered over San Francisco Bay the day after his death.

In 2017, Sharon Meadow in Golden Gate Park in San Francisco, the home of the annual Comedy Day, was renamed, Robin Williams Meadow.

In 2018, HBO produced a documentary about his life and career. Directed by Marina Zenovich, the film, Robin Williams: Come Inside My Mind, was also screened at the Sundance Film Festival. That same year, a mural of Robin Williams was created on Market Street, in San Francisco.

In May 2019, Zak Williams and his fiancée announced the birth of their son, McLaurin "Mickey" Clement Williams, Robin's first grandchild. McLaurin was Robin's middle name. Cody Williams and his fiancée were married on July 21, 2019, on what would have been Williams' 68th birthday.