Demonstrators protest outside Westminster Magistrates Court in London on October 21, 2019, where WikiLeaks founder Julian Assange has been attending a case management hearing as he fights extradition to the United States.

WikiLeaks founder Julian Assange appeared confused at a London court hearing on Monday, struggling to recall his name and age in his first public appearance in months as he sought to fight his extradition to the United States.

Assange, 48, who spent seven years holed up in Ecuador's embassy before he was dragged out in April, faces 18 counts in the United States including conspiring to hack government computers and violating an espionage law. He could spend decades in prison if convicted.

On Monday he appeared clean-shaven, without the long beard he had worn at his last public appearance in May, when he was sentenced to 50 weeks jail for skipping bail. He appeared in good health, with his white hair combed back and wearing a navy suit over a light blue sweater and white shirt.

But he mumbled and stuttered for several seconds as he gave his name and date of birth at the start of a preliminary hearing in the case.

When the judge asked him at the end of the hearing if he knew what was happening, he replied "not exactly", complained about the conditions in jail, and said he was unable to "think properly".

"I don't understand how this is equitable," he said. "I can't research anything, I can't access any of my writing. It's very difficult where I am."

Assange is being held in British jail pending the U.S. extradition, having served his sentence for skipping bail.