1982–1999: Film stardom and acclaim
Williams starred as the lead character in the comedy drama film The World According to Garp (1982), which he noted "may have lacked a certain madness onscreen, but it had a great core". Critic Roger Ebert wrote of his performance, "Although Robin Williams plays Garp as a relatively plausible, sometimes ordinary person, the movie never seems bothered by the jarring contrast between his cheerful pluckiness and the anarchy around him." Williams continued with the comedy drama film, Moscow on the Hudson (1984), where he played a Russian musician who defects to the United States. Ebert noted, "The Russian is played by Robin Williams, who disappears so completely into his quirky, lovable, complicated character that he's quite plausible as a Russian". He had other smaller roles in less successful films, such as The Survivors (1983), The Best of Times (1986) and Club Paradise (1986).
In an interview with critic William Arnold in July 1986, Williams said, "My biggest problem in movies is that I'm a character actor. I don't like the pressure of having to carry the story, to have to advance the plot. It's hard. I guess I just don't want to be the total star. That's what attracted me to Club Paradise. Producers have a hard time understanding that. That's not really what I do. I don't want to be Bogart: I want to be Peter Lorre. Give me a moustache and we'll talk." But Williams later said that those smaller roles in films like Club Paradise ultimately did not help advance his film career.
In 1986, Williams also co-hosted the 58th Academy Awards. The following year, he appeared in a sketch comedy special Carol, Carl, Whoopi and Robin (1987), acting alongside Carol Burnett, Carl Reiner, and Whoopi Goldberg. Williams was also a regular guest on various talk shows, including The Tonight Show Starring Johnny Carson and Late Night with David Letterman, on which he appeared 50 times. Williams finally found his star-making 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 troops entertained with comedy and sarcasm. Williams was allowed to play the role without a script, improvising most of his lines. Over the microphone, Williams created voice impressions of various 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".
Williams appeared opposite Steve Martin at Lincoln Center in an off-Broadway production of Waiting for Godot in 1988. In 1989, he played a private-school English teacher in Dead Poets Society, which included a final, emotional scene that some critics said "inspired a generation" and became a part of pop culture. In Awakenings (1990), he plays a doctor modeled after Oliver Sacks, who wrote the book on which the film is based. Sacks later said the way Williams's mind worked was a "form of genius". Similarly, Williams's performance as a therapist in Good Will Hunting (1997) deeply affected even some real therapists. Williams won an Academy Award for Best Supporting Actor for his performance.
In 1991, Williams played an adult Peter Pan in the fantasy film Hook, although he had said that he would have to lose 25 pounds for the role. Similarly in 1995, he played Alan Parrish in the fantasy film Jumanji. Many of his roles during this time were in comedies or dramedies, including his Academy Award for Best Actor nominated performance as a troubled homeless man in The Fisher King (1991), an eccentric toymaker in Toys (1992), a divorced father who impersonates a nanny so he can spend time with his children in Mrs. Doubtfire (1993), a gay man forced to act straight in The Birdcage (1996), a boy who ages four times faster than normal in Jack (1996), an absent-minded professor in Flubber (1997), and a real-life doctor who treats his patients with compassion and humor in Patch Adams (1998); many of these roles were tinged with pathos. Terry Gilliam, who directed Williams in two of his films, The Adventures of Baron Munchausen (1988) and The Fisher King (1991), said in 1992 that Williams had the ability to "go from manic to mad to tender and vulnerable ... [Williams had] the most unique mind on the planet. There's nobody like him out there."
Williams also voiced characters in several animated films. He lent his voice to FernGully: The Last Rainforest (1992). In one of his most well-known voice roles, his character as the Genie in the animated musical Aladdin (1992) was written for Williams. The film's directors said that they had taken a risk by writing the role. At first, Williams refused the role because it was a Disney movie and he did not want the studio profiting by selling merchandise based on the movie. Williams 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 Jr., Peter Lorre, Arnold Schwarzenegger, and Arsenio Hall. Williams's 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 Special Golden Globe Award for Vocal Work in a Motion Picture for Williams. His performance paved the way for other animated films to incorporate actors with more star power. Williams was named a Disney Legend in 2009.
Due to Disney breaking an agreement with Williams regarding the use of the Genie in the advertising for Aladdin, he refused to sign for the direct-to-video sequel, The Return of Jafar (1994); the Genie was instead voiced by Dan Castellaneta. When Jeffrey Katzenberg was replaced by Joe Roth as Walt Disney Studios chairman, Roth organized a public apology to Williams. He would, in turn, reprise the role in the second sequel, Aladdin and the King of Thieves (1996). Other dramatic performances by Williams include Kenneth Branagh's version of Hamlet (1996), What Dreams May Come (1998), and Bicentennial Man (1999). Williams appeared with fellow comedian, Billy Crystal, in an unscripted cameo at the beginning of a 1997 episode of the third season of Friends.
Looking over most of Williams's filmography, one writer was "struck by the breadth" and radical diversity of most of the roles Williams portrayed. Among the actors who helped Williams during his acting career, he credited Robert De Niro, from whom Williams learned the power of silence and economy of dialogue when acting. From Dustin Hoffman, with whom Williams co-starred in Hook, he learned to take on totally different character types, and to transform his characters by extreme preparation. Mike Medavoy, producer of Hook, told its director, Steven Spielberg, that he intentionally teamed up Hoffman and Williams for the film because he knew they wanted to work together, and that Williams welcomed the opportunity of working with Spielberg. Having Woody Allen, who directed him and Billy Crystal in Deconstructing Harry (1997), helped Williams. Allen knew that Crystal and Williams had often worked together on stage.