One of the organisers Tea Jarc said protesters were demanding snap elections, adding that Jansa was taking the country down the route of a dictatorship.
Slovenia has seen protests throughout the last year against Jansa's government, although Friday's event was the largest for several months.
Protesters say the government is clamping down on civil rights by attacking the media and limiting the rights of environmental groups.
Confirmed as prime minister in February 2020, Jansa had previously led the Slovenian government from 2004 to 2008 and from 2012 to 2013.
He is close to Hungarian Prime Minister Viktor Orban and has advocated stricter border controls to prevent the inflow of illegal migrants.
Jansa's predecessor Marjan Sarec resigned because his cabinet did not have sufficient support in parliament to enforce important legislation. A regular parliamentary election is due in the middle of 2022.