The rally marked six months of detention for pro-independence activists Jordi Cuixart and Jordi Sanchez, who face charges of rebellion leading to a jail term of 30 years.
The protesters were united in their protest against the pre-trial imprisonment of the political leaders.
Alex de Ferrer, a 50-year-old IT specialist, said he'planned to take part in the protest because jailing separatist leaders "only serves to manufacture separatists". It was these two groups which organized Sunday's demonstration under the umbrella "Space for Democracy and Co-existence".More news: 2 bodies, vehicle found after California family's SUV went into river
Seven other Catalan separatist leaders are in jail in Spain while they await trial for rebellion, along with the two leaders of the grassroots separatist groups.
The secretary-general of the Catalan branch of UGT, Camil Ros, said that there had been tension among union members just as there was in the rest of Catalan society. "What we as labor unions are asking for now is dialogue".
The Guardia Urbana, a Catalan municipal police force, said 315,000 people turned out.More news: Tamil Nadu: College teacher arrested for 'luring' students into prostitution
Former president Carles Puigdemont is awaiting a decision on his extradition from Germany.
Former president of Catalonia Carles Puigdemont tweeted his support for the demonstration from Germany, where he was arrested last month on an worldwide warrant. Pro-independence parties retained a slim majority in the regional parliament after an election in December.
The Supreme Court of Spain prosecuted them for the crimes of rebellion and / or embezzlement of public funds for their role in holding a referendum on self-determination, which led to a unilateral declaration of independence on 27 October. If a new leader is not named before the end of May, Catalonia will be forced to call another election.More news: WoodTrust Financial Corp Acquires Shares of 47409 Microsoft Co. (MSFT)