The 82-year-old American, who is best known for playing Lando Calrissian in the films The Empire Strikes Back and Return Of The Jedi, said he sees himself as masculine and feminine.
He added he was “not afraid to show that side” of himself.
Williams, who will reprise the famous Star Wars role on the big screen later this month in The Rise Of Skywalker, said: “I never tried to be anything except myself.”
He said: “I think of myself as a relatively colourful character who doesn’t take himself or herself too seriously…And you see I say ‘himself’ and herself’, because I also see myself as feminine as well as masculine.
“I’m a very soft person. I’m not afraid to show that side of myself.”
In September, British singer Sam Smith asked fans to use the pronouns “they/them”, not “he/him”, after coming out as non-binary.
Non-binary is a term for people whose gender identity doesn’t sit comfortably with “man” or “woman”.
Non-binary identities are varied and can include people who identify with some aspects of binary identities, while others reject them entirely.
In the 1980 film The Empire Strikes Back, Williams is introduced as an old friend of Han Solo who goes on to betray him.
Williams then transforms into a selfless leader in the fight against Darth Vader and the Empire in the 1983 movie Return Of The Jedi.
He said of his most famous role: “What I presented on that screen people didn’t expect to see. And I deliberately presented something that nobody had experienced before: a romantic brown-skinned boy.”
He was speaking to Esquire magazine and the reporter brought up an interview that fellow actor Donald Glover gave about playing a younger version of Calrissian in Solo: A Star Wars Story, in which he described the character as pansexual.
“Really? That kid is brilliant – just look at those videos,” he said, referring to the music video This Is America by Glover, also known as Childish Gambino.
Pansexual refers to a person whose romantic and/or sexual attraction towards others is not limited by sex or gender.
Williams was asked if the new Star Wars movie would mean the end for his character.
He replied wryly: “It’s a conclusion – certainly it depends on how much money is generated. That’s when they determine where’s the conclusion.
“The one thing about show business, you can resurrect anything.”
Although he is most famous for his Lando Calrissian role, Williams is most proud of his Emmy-nominated performance as Gale Sayers in the 1971 TV movie Brian’s Song.
He said: “It was a love story, really. Between two guys. Without sex. It ended up being a kind of breakthrough in terms of racial division.”
The Rise Of Skywalker is due out in cinemas on 20 December.