Critics say the Mass Organization Law will reverse democratic reforms and violate the constitution's guarantee of freedom of assembly and expression.
Several hundred workers protested outside Parliament on Tuesday as the bill was approved 311 to 50. It must be signed by the president before becoming law.
The bill prohibits groups from committing blasphemy, promoting separatism or advocating violence. Foreign-founded organizations would require permits, while domestic ones must register with authorities.
Labor unions, rights activists and Muslim groups have voiced objections to the bill and said they will challenge it in the Constitutional Court.
Civic groups were tightly regulated under the authoritarian Suharto government which was ousted in 1998.