Indonesian drivers' protest against Uber and other taxi hailing service providers turned violent on Tuesday with mobs attacking cabs with passengers and blocking arterial roads.

Thousands of taxi and bus drivers have been protesting against Uber and other taxi hailing applications for more than a week, after the government decided to allow app-based cabs to operate as cooperatives.

While the protest turned violent in major cities on Tuesday, in Jakarta, roads were blocked and vehicles attacked even as protesters marched to the parliament building.

Drivers holding signs saying "stop illegal taxis" were seen attacking cab rives who did not participate in the protests.

"I want them to shut down Uber, GrabCar, Go-Jek because they are ruining us," a taxi driver told the Agence France-Presse.

Besides ride hailing apps like Uber and GrabCar, motorbike taxi-hailing service like GrabBike and Go-Jek are also hugely popular in capital Jakarta, which has a population of ten million and creaky public transport infrastructure.

The government had banned ride hailing taxi operators in December but backtracked in the face of stiff online opposition to the move.

On Tuesday, about 10,000 drivers held protest rallies in capital alone, Jakarta Post said.

"My passengers were forced to get out. My car was bumped and the protestors threatened to hit my passengers if they refused to get out," the daily quoted a driver as saying.

Footage doing the rounds on social media showed mobs of drivers attacking taxis that were plying with passengers.

Meanwhile, the transportation ministry said Uber and GrabCar must secure a licence to provide transport to the public. The service prodders will be labelled illegal until they secure a licence, the ministry said.