Born into a working class London family, his local accent would soon disappear to be replaced by a fruitily camp drawl in which he delivered his trademark "Oh, stop messing about."
After dallying with cartography in his teens, Williams became interested in the theatre and joined an amateur drama group.
While serving in the army during World War II, he worked as a Royal Engineer in the Survey Section, and later became an entertainer for the troops in the Combined Services Entertainments.
After his release from military service in 1948, he worked in repertory theatre around Britain, eventually ending up on the London stage.
During the 1950s, he made his name in popular revues, such as 'Share My Lettuce', 'Pieces of Eight' and 'One Over the Eight'.
He played opposite many of the big names of the day, including Maggie Smith and Ingrid Bergman, and was also a close friend of the playwright, Joe Orton.
While becoming a household name through TV and radio, it was in the long-running 'Carry On' series that he really made his name for his snooty characterisations.
His first big screen appearance came in 'Trent's Last Case' in 1952, and he went onto appear in more than sixty movies, until 'Carry On Emmanuelle' in 1978.
Williams' first in the hit series was 'Carry On Sergeant', in 1958 (he was paid £800), and he went on to feature in more than twenty through his career.
Never satisfied with his career (he dismissed the 'Carry Ons' as "a mess"), he never really escaped the comedy straitjacket and also had problems comin to terms with his homosexuality.
Williams publicly insisted that he was celibate. His diaries contain many references to unconsummated or barely consummated relationships, described in code as "traditional matters", probably because homosexuality was still a criminal offence in the United Kingdom for much of the period covered by the diaries.
Williams lived alone for the whole of his adult life. In later years, as his health declined, along with that of his elderly mother, his depression deepened. His eventual death in 1988 caused some dispute.
The cause of death was given as an overdose of barbiturates. An inquest recorded an open verdict as it was not possible to establish whether his death was the result of suicide or an accident.
Suicide or not, his final diary entry pretty much sums up his attitude to life: "Oh, what's the bloody point?"