Assange has already spent a week in a U.K. jail following his surrender to British police over a Swedish sex-crimes warrant. He denies any wrongdoing and has already refused to voluntarily surrender to Sweden's request to extradite him for questioning.
In a day of courtroom drama, the 39-year-old Australian was first told by a judge that he would be freed, then less than two hours later was informed he had at least another 48 hours in custody.
Britain's High Court will hear the Swedish appeal, but it wasn't clear exactly when.
"They clearly will not spare any expense to keep Mr. Assange in jail," his lawyer Mark Stephens told journalists outside the entrance to the City of Westminster Magistrates' Court in London. "This is really turning into a show trial."
Lawyer Gemma Lindfield, acting for Sweden, had asked the court to deny Assange bail, arguing Tuesday that the allegations against him were serious, that he has only weak ties to Britain and he has "the means and ability to abscond."
Reminding the court that it had already labeled Assange "a flight risk," she argued that "nothing has changed since last week to allay the court's fears in this regard."
She also rejected attempts to link Assange's case with the work of WikiLeaks — which last month deeply angered U.S. officials by beginning to publish its trove of 250,000 secret U.S. diplomatic cables.